mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Fix focus follows mouse
This commit is contained in:
parent
9f091c7f82
commit
ba14118f13
|
@ -103,6 +103,7 @@ bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_orig
|
||||||
swayc_t *focused = get_focused_container(&root_container);
|
swayc_t *focused = get_focused_container(&root_container);
|
||||||
if (c && c != focused) {
|
if (c && c != focused) {
|
||||||
sway_log(L_DEBUG, "Switching focus to %p", c);
|
sway_log(L_DEBUG, "Switching focus to %p", c);
|
||||||
|
unfocus_all(&root_container);
|
||||||
focus_view(c);
|
focus_view(c);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -115,6 +116,7 @@ bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modi
|
||||||
swayc_t *focused = get_focused_container(&root_container);
|
swayc_t *focused = get_focused_container(&root_container);
|
||||||
if (c && c != focused) {
|
if (c && c != focused) {
|
||||||
sway_log(L_DEBUG, "Switching focus to %p", c);
|
sway_log(L_DEBUG, "Switching focus to %p", c);
|
||||||
|
unfocus_all(&root_container);
|
||||||
focus_view(c);
|
focus_view(c);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue