Skip to content

Commit cd24710

Browse files
committed
WindowManager: correctly offset window actor
1 parent 19f02dc commit cd24710

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/WindowManager.vala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,8 +1538,13 @@ namespace Gala {
15381538

15391539
latest_window_snapshot = null;
15401540

1541+
var buffer_rect = window.get_buffer_rect ();
1542+
var frame_rect = window.get_frame_rect ();
1543+
var real_actor_offset_x = frame_rect.x - buffer_rect.x;
1544+
var real_actor_offset_y = frame_rect.y - buffer_rect.y;
1545+
15411546
actor.set_pivot_point (0.0f, 0.0f);
1542-
actor.set_position (ex, ey);
1547+
actor.set_position (ex - real_actor_offset_x, ey - real_actor_offset_y);
15431548
actor.set_translation (-ex + offset_x * (1.0f / scale_x - 1.0f) + old_rect_size_change.x, -ey + offset_y * (1.0f / scale_y - 1.0f) + old_rect_size_change.y, 0.0f);
15441549
actor.set_scale (1.0f / scale_x, 1.0f / scale_y);
15451550

0 commit comments

Comments
 (0)