sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit ffb34583220005889fea117d3b9bc65a4714b6bf
parent 498cf268f712e0bc8d00cf9ef7e3886129904c67
Author: taiyu <taiyu.len@gmail.com>
Date:   Sun, 16 Aug 2015 18:41:51 -0700

focus changes when mouse moves over border instead of all mouse movement

Diffstat:
Msway/handlers.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 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 static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) { mouse_origin = *origin; - if (!config->focus_follows_mouse) { - return false; + static wlc_handle prev_view = -1; + if (config->focus_follows_mouse && prev_view != view) { + focus_pointer(); } - focus_pointer(); + prev_view = view; return false; }