aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-16 16:00:11 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-16 16:00:11 -0400
commit981db16a8e3eaa921691a106614e56af662cd8c2 (patch)
treed09ce7382b9b1d7d08336eb31c575383332a8fe3 /sway
parent4a5828370c27c318a5e6c0113ea9ed559f446be1 (diff)
Return false from pointer events
Diffstat (limited to 'sway')
-rw-r--r--sway/handlers.c11
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
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 true;
+ return false;
}
focus_pointer();
- return true;
+ return false;
}
static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers,
uint32_t button, enum wlc_button_state state) {
- swayc_t *focused = get_focused_container(&root_container);
+ get_focused_container(&root_container);
if (state == WLC_BUTTON_STATE_PRESSED) {
- swayc_t *pointer = focus_pointer();
- return !(pointer && pointer != focused);
+ focus_pointer();
}
- return true;
+ return false;
}
static void handle_wlc_ready(void) {