From 42c2e41d6c1f3613f601082bdf874b728800271f Mon Sep 17 00:00:00 2001 From: Sophie Winter Date: Thu, 4 Jan 2024 17:51:01 -0800 Subject: Fix positioning on Wayland when output is not at position 0, 0 --- src/daemon/wayland.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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) { -- cgit v1.2.1