Skip to content

Commit 5ecfa7d

Browse files
authored
WindowManager: correctly offset window actor (#2428)
1 parent f11b0c6 commit 5ecfa7d

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
@@ -1537,8 +1537,13 @@ namespace Gala {
15371537

15381538
latest_window_snapshot = null;
15391539

1540+
var buffer_rect = window.get_buffer_rect ();
1541+
var frame_rect = window.get_frame_rect ();
1542+
var real_actor_offset_x = frame_rect.x - buffer_rect.x;
1543+
var real_actor_offset_y = frame_rect.y - buffer_rect.y;
1544+
15401545
actor.set_pivot_point (0.0f, 0.0f);
1541-
actor.set_position (ex, ey);
1546+
actor.set_position (ex - real_actor_offset_x, ey - real_actor_offset_y);
15421547
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);
15431548
actor.set_scale (1.0f / scale_x, 1.0f / scale_y);
15441549

0 commit comments

Comments
 (0)