diff options
author | 2015-08-09 20:13:22 -0400 | |
---|---|---|
committer | 2015-08-09 20:13:22 -0400 | |
commit | ba14118f13051ea747c4972ab799f36500109481 (patch) | |
tree | 1130feb6ba67195a1fb013e86561d98858f2ed4b /sway | |
parent | Add movement support (diff) | |
download | sway-ba14118f13051ea747c4972ab799f36500109481.tar.gz sway-ba14118f13051ea747c4972ab799f36500109481.tar.zst sway-ba14118f13051ea747c4972ab799f36500109481.zip |
Fix focus follows mouse
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 70d044b6..7d45452f 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -103,6 +103,7 @@ bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_orig | |||
103 | swayc_t *focused = get_focused_container(&root_container); | 103 | swayc_t *focused = get_focused_container(&root_container); |
104 | if (c && c != focused) { | 104 | if (c && c != focused) { |
105 | sway_log(L_DEBUG, "Switching focus to %p", c); | 105 | sway_log(L_DEBUG, "Switching focus to %p", c); |
106 | unfocus_all(&root_container); | ||
106 | focus_view(c); | 107 | focus_view(c); |
107 | } | 108 | } |
108 | return true; | 109 | return true; |
@@ -115,6 +116,7 @@ bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modi | |||
115 | swayc_t *focused = get_focused_container(&root_container); | 116 | swayc_t *focused = get_focused_container(&root_container); |
116 | if (c && c != focused) { | 117 | if (c && c != focused) { |
117 | sway_log(L_DEBUG, "Switching focus to %p", c); | 118 | sway_log(L_DEBUG, "Switching focus to %p", c); |
119 | unfocus_all(&root_container); | ||
118 | focus_view(c); | 120 | focus_view(c); |
119 | return false; | 121 | return false; |
120 | } | 122 | } |