summaryrefslogtreecommitdiff
path: root/swaynag
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-09-13 20:32:30 +0800
committerFurkan Sahin <furkan-dev@proton.me>2021-09-13 20:32:30 +0800
commit822f3bd5778c849ec161ce207a2eaac36b92ee20 (patch)
treef60dea4258264845cc92d04d2ff9b850ab2442d6 /swaynag
parent626cf43e5850af5f68375ff7c3ba3fd1a90fc7c3 (diff)
swaynag: fix pointer button events on scaled outputs
sway#6504 simplified rendering code by setting scaling at cairo, but that also changed button position records into ones without scale multiplication, breaking button events. This fixes it by not multiplying scale on events handling as well.
Diffstat (limited to 'swaynag')
-rw-r--r--swaynag/swaynag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c
index dd17c0b0..6d4a7a58 100644
--- a/swaynag/swaynag.c
+++ b/swaynag/swaynag.c
@@ -200,8 +200,8 @@ static void wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
return;
}
- double x = seat->pointer.x * swaynag->scale;
- double y = seat->pointer.y * swaynag->scale;
+ double x = seat->pointer.x;
+ double y = seat->pointer.y;
for (int i = 0; i < swaynag->buttons->length; i++) {
struct swaynag_button *nagbutton = swaynag->buttons->items[i];
if (x >= nagbutton->x