mirror of
https://github.com/NickHu/sway
synced 2024-12-28 22:23:30 +01:00
Fix pointer button events for layer surfaces
This commit is contained in:
parent
84109431f7
commit
c833ae64bc
1 changed files with 5 additions and 7 deletions
|
@ -255,14 +255,12 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
|
||||||
wlr_layer_surface_from_wlr_surface(surface);
|
wlr_layer_surface_from_wlr_surface(surface);
|
||||||
if (layer->current.keyboard_interactive) {
|
if (layer->current.keyboard_interactive) {
|
||||||
seat_set_focus_layer(cursor->seat, layer);
|
seat_set_focus_layer(cursor->seat, layer);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
} else if (surface && cont && cont->type != C_VIEW) {
|
||||||
// Avoid moving keyboard focus from a surface that accepts it to one
|
// Avoid moving keyboard focus from a surface that accepts it to one
|
||||||
// that does not unless the change would move us to a new workspace.
|
// that does not unless the change would move us to a new workspace.
|
||||||
//
|
//
|
||||||
// This prevents, for example, losing focus when clicking on swaybar.
|
// This prevents, for example, losing focus when clicking on swaybar.
|
||||||
if (surface && cont && cont->type != C_VIEW) {
|
|
||||||
struct sway_container *new_ws = cont;
|
struct sway_container *new_ws = cont;
|
||||||
if (new_ws && new_ws->type != C_WORKSPACE) {
|
if (new_ws && new_ws->type != C_WORKSPACE) {
|
||||||
new_ws = container_parent(new_ws, C_WORKSPACE);
|
new_ws = container_parent(new_ws, C_WORKSPACE);
|
||||||
|
|
Loading…
Reference in a new issue