diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-16 16:00:11 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-16 16:00:11 -0400 |
commit | 981db16a8e3eaa921691a106614e56af662cd8c2 (patch) | |
tree | d09ce7382b9b1d7d08336eb31c575383332a8fe3 | |
parent | Log output name when added to tree (diff) | |
download | sway-981db16a8e3eaa921691a106614e56af662cd8c2.tar.gz sway-981db16a8e3eaa921691a106614e56af662cd8c2.tar.zst sway-981db16a8e3eaa921691a106614e56af662cd8c2.zip |
Return false from pointer events
-rw-r--r-- | sway/handlers.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index d843f44b..960c3c68 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -199,20 +199,19 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier | |||
199 | static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) { | 199 | static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) { |
200 | mouse_origin = *origin; | 200 | mouse_origin = *origin; |
201 | if (!config->focus_follows_mouse) { | 201 | if (!config->focus_follows_mouse) { |
202 | return true; | 202 | return false; |
203 | } | 203 | } |
204 | focus_pointer(); | 204 | focus_pointer(); |
205 | return true; | 205 | return false; |
206 | } | 206 | } |
207 | 207 | ||
208 | static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, | 208 | static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, |
209 | uint32_t button, enum wlc_button_state state) { | 209 | uint32_t button, enum wlc_button_state state) { |
210 | swayc_t *focused = get_focused_container(&root_container); | 210 | get_focused_container(&root_container); |
211 | if (state == WLC_BUTTON_STATE_PRESSED) { | 211 | if (state == WLC_BUTTON_STATE_PRESSED) { |
212 | swayc_t *pointer = focus_pointer(); | 212 | focus_pointer(); |
213 | return !(pointer && pointer != focused); | ||
214 | } | 213 | } |
215 | return true; | 214 | return false; |
216 | } | 215 | } |
217 | 216 | ||
218 | static void handle_wlc_ready(void) { | 217 | static void handle_wlc_ready(void) { |