mirror of
https://github.com/swaywm/sway.git
synced 2026-03-20 05:34:28 -04:00
swaybar: Fix scroll handling on workspace buttons
As well as ignoring scroll events on status elements when click_events is enabled. Previously, using the scroll wheel on a workspace button would switch to that workspace instead of scrolling through them. Clicks and scrolling on status elements would always be processed by swaybar, too. So in case you were using scrolling as volume control on a status item, swaybar would additionally scroll through your workspaces.
This commit is contained in:
parent
da9c86c608
commit
bfcfabee2b
5 changed files with 26 additions and 12 deletions
|
|
@ -29,10 +29,15 @@ enum x11_button {
|
|||
FORWARD,
|
||||
};
|
||||
|
||||
enum hotspot_event_handling {
|
||||
HOTSPOT_IGNORE,
|
||||
HOTSPOT_PROCESS,
|
||||
};
|
||||
|
||||
struct swaybar_hotspot {
|
||||
struct wl_list link;
|
||||
int x, y, width, height;
|
||||
void (*callback)(struct swaybar_output *output,
|
||||
enum hotspot_event_handling (*callback)(struct swaybar_output *output,
|
||||
int x, int y, enum x11_button button, void *data);
|
||||
void (*destroy)(void *data);
|
||||
void *data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue