summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSophie Winter <[email protected]>2024-01-04 17:51:01 -0800
committerLuke from DC <[email protected]>2024-01-05 02:48:14 +0000
commit42c2e41d6c1f3613f601082bdf874b728800271f (patch)
treec6899a89d20a7dbf4239db128091673140b7c84a /src
parentd7b86efd4584548d676bf7c53f6d9a6d5584a1c5 (diff)
downloadmate-notification-daemon-42c2e41d6c1f3613f601082bdf874b728800271f.tar.bz2
mate-notification-daemon-42c2e41d6c1f3613f601082bdf874b728800271f.tar.xz
Fix positioning on Wayland when output is not at position 0, 0
Diffstat (limited to 'src')
-rw-r--r--src/daemon/wayland.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/daemon/wayland.c b/src/daemon/wayland.c
index 1659bd3..e42867b 100644
--- a/src/daemon/wayland.c
+++ b/src/daemon/wayland.c
@@ -51,10 +51,10 @@ void wayland_move_notification (GtkWindow* nw, int x, int y)
gdk_monitor_get_workarea (monitor, &workarea);
GtkRequisition req;
gtk_widget_get_preferred_size (GTK_WIDGET (nw), NULL, &req);
- int left_gap = x;
- int top_gap = y;
- int right_gap = workarea.width - x - req.width;
- int bottom_gap = workarea.height - y - req.height;
+ int left_gap = x - workarea.x;
+ int top_gap = y - workarea.y;
+ int right_gap = workarea.x + workarea.width - x - req.width;
+ int bottom_gap = workarea.y + workarea.height - y - req.height;
if (left_gap < right_gap)
{