aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/tray
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/tray')
-rw-r--r--swaybar/tray/tray.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/swaybar/tray/tray.c b/swaybar/tray/tray.c
index e926faae..924ff1a0 100644
--- a/swaybar/tray/tray.c
+++ b/swaybar/tray/tray.c
@@ -432,9 +432,13 @@ err:
432 return -1; 432 return -1;
433} 433}
434 434
435void tray_mouse_event(struct output *output, int x, int y, 435void tray_mouse_event(struct output *output, int rel_x, int rel_y,
436 uint32_t button, uint32_t state) { 436 uint32_t button, uint32_t state) {
437 437
438 int x = rel_x;
439 int y = rel_y + (swaybar.config->position == DESKTOP_SHELL_PANEL_POSITION_TOP
440 ? 0 : (output->state->height - output->window->height));
441
438 struct window *window = output->window; 442 struct window *window = output->window;
439 uint32_t tray_padding = swaybar.config->tray_padding; 443 uint32_t tray_padding = swaybar.config->tray_padding;
440 int tray_width = window->width * window->scale; 444 int tray_width = window->width * window->scale;