summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 16:12:40 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 16:12:40 -0400
commit75144318367dddd110f97c5693b2d543b7564f15 (patch)
tree166c5cb63e7d673dd17c108b8291cfe2debf6a50
parentRevert "Return false from pointer events" (diff)
downloadsway-75144318367dddd110f97c5693b2d543b7564f15.tar.gz
sway-75144318367dddd110f97c5693b2d543b7564f15.tar.zst
sway-75144318367dddd110f97c5693b2d543b7564f15.zip
Fix pointer events properly
-rw-r--r--sway/handlers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index d843f44b..32b0051d 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -199,10 +199,10 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
199static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) { 199static 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
208static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, 208static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers,
@@ -210,9 +210,9 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
210 swayc_t *focused = get_focused_container(&root_container); 210 swayc_t *focused = 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 swayc_t *pointer = focus_pointer();
213 return !(pointer && pointer != focused); 213 return (pointer && pointer != focused);
214 } 214 }
215 return true; 215 return false;
216} 216}
217 217
218static void handle_wlc_ready(void) { 218static void handle_wlc_ready(void) {