Skip to content

Commit b8943dd

Browse files
authored
WindowClone: Fix interaction with multiple monitors (#2406)
1 parent d1acdcc commit b8943dd

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

data/gala.metainfo.xml.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@
2727
<update_contact>contact_at_elementary.io</update_contact>
2828

2929
<releases>
30+
<release version="8.2.3" date="2025-05-20" urgency="medium">
31+
<description>
32+
<p>Improvements:</p>
33+
<ul>
34+
<li>Updated translations</li>
35+
</ul>
36+
</description>
37+
<issues>
38+
<issue url="https://github.com/elementary/gala/issues/2400">Switching workspaces makes the windows move down with multiple monitors</issue>
39+
</issues>
40+
</release>
41+
3042
<release version="8.2.2" date="2025-05-17" urgency="medium">
3143
<description>
3244
<p>Improvements:</p>

src/Widgets/MultitaskingView/WindowClone.vala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,10 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
245245
}
246246

247247
var window_rect = window.get_frame_rect ();
248+
var monitor_geometry = window.display.get_monitor_geometry (window.get_monitor ());
248249

249-
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "x", typeof (float), (float) window_rect.x, (float) slot.x));
250-
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "y", typeof (float), (float) window_rect.y, (float) slot.y));
250+
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "x", typeof (float), (float) (window_rect.x - monitor_geometry.x), (float) slot.x));
251+
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "y", typeof (float), (float) (window_rect.y - monitor_geometry.y), (float) slot.y));
251252
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "width", typeof (float), (float) window_rect.width, (float) slot.width));
252253
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "height", typeof (float), (float) window_rect.height, (float) slot.height));
253254
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "shadow-opacity", typeof (uint8), (uint8) 0u, (uint8) 255u));

0 commit comments

Comments
 (0)