diff options
| author | Drew DeVault <sir@cmpwn.com> | 2018-07-20 11:45:47 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-20 11:45:47 -0400 | 
| commit | b642d47c7f1f61993edd20200298fe971f636bbb (patch) | |
| tree | bec87e642ae380995b5addc12624b83600489a60 /swaybar/render.c | |
| parent | 0a0b676f6457c0272264e9f0e9435a15b50d999b (diff) | |
| parent | bfcfabee2b7e6bd820929a3cb86c4981a6385ac7 (diff) | |
| download | sway-b642d47c7f1f61993edd20200298fe971f636bbb.tar.xz | |
Merge pull request #2313 from minus7/swaybar-hotspot-input-fix
swaybar: Fix scroll handling on workspace buttons
Diffstat (limited to 'swaybar/render.c')
| -rw-r--r-- | swaybar/render.c | 10 | 
1 files changed, 7 insertions, 3 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index d210e25a..6f370077 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -108,11 +108,11 @@ static void render_sharp_line(cairo_t *cairo, uint32_t color,  	}  } -static void block_hotspot_callback(struct swaybar_output *output, +static enum hotspot_event_handling block_hotspot_callback(struct swaybar_output *output,  			int x, int y, enum x11_button button, void *data) {  	struct i3bar_block *block = data;  	struct status_line *status = output->bar->status; -	i3bar_block_send_click(status, block, x, y, button); +	return i3bar_block_send_click(status, block, x, y, button);  }  static uint32_t render_status_block(cairo_t *cairo, @@ -348,9 +348,13 @@ static const char *strip_workspace_number(const char *ws_name) {  	return ws_name;  } -static void workspace_hotspot_callback(struct swaybar_output *output, +static enum hotspot_event_handling workspace_hotspot_callback(struct swaybar_output *output,  			int x, int y, enum x11_button button, void *data) { +	if (button != LEFT) { +		return HOTSPOT_PROCESS; +	}  	ipc_send_workspace_command(output->bar, (const char *)data); +	return HOTSPOT_IGNORE;  }  static uint32_t render_workspace_button(cairo_t *cairo,  | 
