mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
Focus workspace when swaybar is clicked
This matches i3's behaviour.
This commit is contained in:
parent
cd02d60a99
commit
75ad08598c
1 changed files with 8 additions and 0 deletions
|
|
@ -170,6 +170,14 @@ static void wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct swaybar_workspace *iter;
|
||||||
|
wl_list_for_each(iter, &output->workspaces, link) {
|
||||||
|
if (iter->visible) {
|
||||||
|
ipc_send_workspace_command(bar, iter->name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (check_bindings(bar, wl_button_to_x11_button(button), state)) {
|
if (check_bindings(bar, wl_button_to_x11_button(button), state)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue