summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-05-08 13:26:46 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-05-08 13:26:46 -0500
commited60eddff5cf2c9397eb30afad25ce30266ab65e (patch)
tree64b8a877e31aa561737d314b9c9a75534b99d4cc /src/lib/ecore_wl2/ecore_wl2_input.c
parentf78ff5f4455bd9e945d015c00ddfc1f5d3415f55 (diff)
ecore_wl2: Fix window drag mouse eventing
Summary: When a CSD button interaction under wayland leads to a compositor action like move or resize, we essentially "give back" that button press to the compositor, and it never sends us a mouse up for it. We need to internally fire a mouse up event to fix up state so the client doesn't think the mouse is still down. Until now we've been doing this by setting a flag when we start a move/resize and checking it at next pointer enter for the window. This leads to unsolvable races and wacky bookkeeping, and runs afoul of the fact that we're not actually guaranteed a pointer enter immediately after a move completes. There is absolutely no way at all on wayland to know if a move or resize operation has completed. So, let's just fire the mouse up immediately on start of interaction, which is raceless. This fixes a years old bug where dragging a window might leave a stuck mouse up, and allow hilighting text without drag after the window drag completes. (elementary-test -to "text editor" with multiple windows open exhibits this bug) Depends on D6127 Reviewers: zmike, cedric Reviewed By: zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6128
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 7e67fc9a99..9d6378f1bb 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -716,13 +716,6 @@ _pointer_cb_enter(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
716 input->focus.pointer = window; 716 input->focus.pointer = window;
717 717
718 _ecore_wl2_input_mouse_in_send(input, window); 718 _ecore_wl2_input_mouse_in_send(input, window);
719
720 if ((window->moving || window->resizing) && (input->grab.window == window))
721 {
722 _ecore_wl2_input_mouse_up_send(input, window, 0, input->grab.button,
723 input->grab.timestamp);
724 window->resizing = window->moving = EINA_FALSE;
725 }
726} 719}
727 720
728static void 721static void