mirror of
https://github.com/swaywm/sway.git
synced 2024-11-24 00:41:28 +00:00
input/seat: emit focus events when focusing parent
Emit a focus event when a container or the entire workspace gets focused (for example, when focus_parent is called). Previously, focus events were only emitted when another view or workspace was focused. This made it impossible to accurately follow the focus by monitoring focus events.
This commit is contained in:
parent
ee7668c1f2
commit
9cfcff0039
|
@ -1198,8 +1198,10 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
|
||||||
|
|
||||||
// emit ipc events
|
// emit ipc events
|
||||||
set_workspace(seat, new_workspace);
|
set_workspace(seat, new_workspace);
|
||||||
if (container && container->view) {
|
if (container) {
|
||||||
ipc_event_window(container, "focus");
|
ipc_event_window(container, "focus");
|
||||||
|
} else if(last_workspace == new_workspace) {
|
||||||
|
ipc_event_workspace(NULL, new_workspace, "focus");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move sticky containers to new workspace
|
// Move sticky containers to new workspace
|
||||||
|
|
Loading…
Reference in a new issue