diff options
author | Sophie Winter <[email protected]> | 2024-01-04 17:51:01 -0800 |
---|---|---|
committer | Luke from DC <[email protected]> | 2024-01-05 02:48:14 +0000 |
commit | 42c2e41d6c1f3613f601082bdf874b728800271f (patch) | |
tree | c6899a89d20a7dbf4239db128091673140b7c84a | |
parent | d7b86efd4584548d676bf7c53f6d9a6d5584a1c5 (diff) | |
download | mate-notification-daemon-42c2e41d6c1f3613f601082bdf874b728800271f.tar.bz2 mate-notification-daemon-42c2e41d6c1f3613f601082bdf874b728800271f.tar.xz |
Fix positioning on Wayland when output is not at position 0, 0
-rw-r--r-- | src/daemon/wayland.c | 8 |
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) { |