mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-11-17 07:48:28 +01:00
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.
This commit is contained in:
parent
3f7a04df22
commit
806b59eca3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue