diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-16 16:10:05 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-16 16:10:05 -0400 |
commit | 787849042595a564cfc185b95023db69be18ed48 (patch) | |
tree | c53554d957731e99838a4ae3ff86bcb23ce82eb7 | |
parent | 981db16a8e3eaa921691a106614e56af662cd8c2 (diff) | |
download | sway-787849042595a564cfc185b95023db69be18ed48.tar.xz |
Revert "Return false from pointer events"
This reverts commit 981db16a8e3eaa921691a106614e56af662cd8c2.
-rw-r--r-- | sway/handlers.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 960c3c68..d843f44b 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -199,19 +199,20 @@ 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; + return true; } focus_pointer(); - return false; + return true; } static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, uint32_t button, enum wlc_button_state state) { - get_focused_container(&root_container); + swayc_t *focused = get_focused_container(&root_container); if (state == WLC_BUTTON_STATE_PRESSED) { - focus_pointer(); + swayc_t *pointer = focus_pointer(); + return !(pointer && pointer != focused); } - return false; + return true; } static void handle_wlc_ready(void) { |