ecore_wl2: Send a mouse-up event on reentry after client initiated resize

Apparently when we initiate a client side move in ecore_wl2 we flag that
and send a mouse-up immediately on the next pointer enter.

Do the same for resize.

At some point this might need to be revisited, we should probably be
sending a "cancel" at the start of client initiated move/resize instead
of an up at the end?

Fix T6422
This commit is contained in:
Derek Foreman 2018-03-20 14:18:48 -05:00
parent 2db8e8e914
commit 94ddefc6fb
3 changed files with 5 additions and 2 deletions

View File

@ -717,11 +717,11 @@ _pointer_cb_enter(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
_ecore_wl2_input_mouse_in_send(input, window);
if ((window->moving) && (input->grab.window == window))
if ((window->moving || window->resizing) && (input->grab.window == window))
{
_ecore_wl2_input_mouse_up_send(input, window, 0, input->grab.button,
input->grab.timestamp);
window->moving = EINA_FALSE;
window->resizing = window->moving = EINA_FALSE;
}
}

View File

@ -231,6 +231,7 @@ struct _Ecore_Wl2_Window
Ecore_Wl2_Window_Configure_State def_config;
Eina_Bool moving : 1;
Eina_Bool resizing : 1;
Eina_Bool alpha : 1;
Eina_Bool transparent : 1;

View File

@ -751,6 +751,8 @@ ecore_wl2_window_resize(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input, int lo
if (!input)
input = EINA_INLIST_CONTAINER_GET(window->display->inputs, Ecore_Wl2_Input);
window->resizing = EINA_TRUE;
if (window->xdg_toplevel)
xdg_toplevel_resize(window->xdg_toplevel, input->wl.seat,
window->display->serial, location);