summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 16:10:05 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 16:10:05 -0400
commit787849042595a564cfc185b95023db69be18ed48 (patch)
treec53554d957731e99838a4ae3ff86bcb23ce82eb7
parentReturn false from pointer events (diff)
downloadsway-787849042595a564cfc185b95023db69be18ed48.tar.gz
sway-787849042595a564cfc185b95023db69be18ed48.tar.zst
sway-787849042595a564cfc185b95023db69be18ed48.zip
Revert "Return false from pointer events"
-rw-r--r--sway/handlers.c11
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
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 false; 202 return true;
203 } 203 }
204 focus_pointer(); 204 focus_pointer();
205 return false; 205 return true;
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,
209 uint32_t button, enum wlc_button_state state) { 209 uint32_t button, enum wlc_button_state state) {
210 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 focus_pointer(); 212 swayc_t *pointer = focus_pointer();
213 return !(pointer && pointer != focused);
213 } 214 }
214 return false; 215 return true;
215} 216}
216 217
217static void handle_wlc_ready(void) { 218static void handle_wlc_ready(void) {