summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/handlers.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 817f197e..0e68a3c8 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -239,10 +239,11 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
239 239
240static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) { 240static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) {
241 mouse_origin = *origin; 241 mouse_origin = *origin;
242 if (!config->focus_follows_mouse) { 242 static wlc_handle prev_view = -1;
243 return false; 243 if (config->focus_follows_mouse && prev_view != view) {
244 focus_pointer();
244 } 245 }
245 focus_pointer(); 246 prev_view = view;
246 return false; 247 return false;
247} 248}
248 249