derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=94ddefc6fb3da07676f63b7a9bf31987e85a1aa3

commit 94ddefc6fb3da07676f63b7a9bf31987e85a1aa3
Author: Derek Foreman <[email protected]>
Date:   Tue Mar 20 14:18:48 2018 -0500

    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
---
 src/lib/ecore_wl2/ecore_wl2_input.c   | 4 ++--
 src/lib/ecore_wl2/ecore_wl2_private.h | 1 +
 src/lib/ecore_wl2/ecore_wl2_window.c  | 2 ++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 3082c5af05..256dd45c15 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -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;
      }
 }
 
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 47590552b6..09fc0abc1c 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -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;
 
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index c907f08ad0..43ab769f80 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -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);

-- 


Reply via email to