diff options
Diffstat (limited to 'swaybar/i3bar.c')
-rw-r--r-- | swaybar/i3bar.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c index 6d00befb..ccd5a076 100644 --- a/swaybar/i3bar.c +++ b/swaybar/i3bar.c | |||
@@ -269,11 +269,16 @@ bool i3bar_handle_readable(struct status_line *status) { | |||
269 | 269 | ||
270 | enum hotspot_event_handling i3bar_block_send_click(struct status_line *status, | 270 | enum hotspot_event_handling i3bar_block_send_click(struct status_line *status, |
271 | struct i3bar_block *block, double x, double y, double rx, double ry, | 271 | struct i3bar_block *block, double x, double y, double rx, double ry, |
272 | double w, double h, int scale, uint32_t button) { | 272 | double w, double h, int scale, uint32_t button, bool released) { |
273 | sway_log(SWAY_DEBUG, "block %s clicked", block->name); | 273 | sway_log(SWAY_DEBUG, "block %s clicked", block->name); |
274 | if (!block->name || !status->click_events) { | 274 | if (!block->name || !status->click_events) { |
275 | return HOTSPOT_PROCESS; | 275 | return HOTSPOT_PROCESS; |
276 | } | 276 | } |
277 | if (released) { | ||
278 | // Since we handle the pressed event, also handle the released event | ||
279 | // to block it from falling through to a binding in the bar | ||
280 | return HOTSPOT_IGNORE; | ||
281 | } | ||
277 | 282 | ||
278 | struct json_object *event_json = json_object_new_object(); | 283 | struct json_object *event_json = json_object_new_object(); |
279 | json_object_object_add(event_json, "name", | 284 | json_object_object_add(event_json, "name", |