path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-06-27 11:31:59 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-06-27 11:32:18 -0400
commit5ce3c4a049b14098c4e85e00c2367b7709693a5d (patch)
tree870b6ece46e77038c39ee54c255ea6008500faef /src/lib/ecore_wl2/ecore_wl2_input.c
parentUi text: make elm test editable (diff)
ecore_wl2: Fix dnd breakage when focus leaves window
Summary: If dnd in the same window is activated, the focus goes away from the ecore_wl2 window to the dnd window, after that focus.pointer is NULL. After focus.pointer is NULL ev->win of all the events will be 0 which breaks dnd-motions, drop and end. With prev_pointer beeing the last focused window, we can simply set this window as event window. After that dnd with jesus works perfectly. @fix Reviewers: devilhorns Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4093
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index e86936c636..7a5899f5b9 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -514,6 +514,7 @@ _pointer_cb_enter(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
if (!window) return;
window->input = input;
+ input->focus.prev_pointer = NULL;
input->focus.pointer = window;
_ecore_wl2_input_mouse_in_send(input, window);
@@ -536,6 +537,7 @@ _pointer_cb_leave(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
if (!input) return;
input->display->serial = serial;
+ input->focus.prev_pointer = input->focus.pointer;
input->focus.pointer = NULL;
/* trap for a surface that was just destroyed */