From b75f0d2be2c535dae299cb9adb2c685a823d9153 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 12 May 2017 12:09:18 -0400 Subject: [PATCH] unset wl button mask when beginning a move/resize operation ensure that clients do not receive a release event for any pressed buttons --- src/bin/e_comp_wl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index c8dc63b78..b5cd20397 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2576,11 +2576,17 @@ _e_comp_wl_client_cb_focus_unset(void *data EINA_UNUSED, E_Client *ec) e_comp_wl->kbd.focus = NULL; } +static void +_e_comp_wl_client_cb_move_begin(void *data EINA_UNUSED, E_Client *ec EINA_UNUSED) +{ + e_comp_wl->ptr.button_mask = 0; +} + static void _e_comp_wl_client_cb_resize_begin(void *data EINA_UNUSED, E_Client *ec) { + e_comp_wl->ptr.button_mask = 0; if (e_client_has_xwindow(ec)) return; - e_comp_wl->resize.edges = 0; if (ec->keyboard_resizing) return; switch (ec->resize_mode) @@ -2907,6 +2913,8 @@ e_comp_wl_init(void) e_client_hook_add(E_CLIENT_HOOK_FOCUS_UNSET, _e_comp_wl_client_cb_focus_unset, NULL); + e_client_hook_add(E_CLIENT_HOOK_MOVE_BEGIN, + _e_comp_wl_client_cb_move_begin, NULL); e_client_hook_add(E_CLIENT_HOOK_RESIZE_BEGIN, _e_comp_wl_client_cb_resize_begin, NULL); e_client_hook_add(E_CLIENT_HOOK_RESIZE_END,