summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-16 18:41:51 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-16 18:41:51 -0700
commitffb34583220005889fea117d3b9bc65a4714b6bf (patch)
treec1c7f522904f6fb0e1c2a081ed7db7840b5e3dad
parentunmanaged views handled better (diff)
downloadsway-ffb34583220005889fea117d3b9bc65a4714b6bf.tar.gz
sway-ffb34583220005889fea117d3b9bc65a4714b6bf.tar.zst
sway-ffb34583220005889fea117d3b9bc65a4714b6bf.zip
focus changes when mouse moves over border instead of all mouse movement
-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