e_comp_wl: move a code checking 'cur_mouse_action' value 94/281794/1
authorduna.oh <duna.oh@samsung.com>
Wed, 21 Sep 2022 01:38:01 +0000 (10:38 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 22 Sep 2022 04:09:30 +0000 (13:09 +0900)
If 'cur_mouse_action' is not null, E20 should not send events to clients.
So its value should be checked right before sending wayland events.
This patch allows the cursor to follow mouse movement when user is doing
mouse action such as resizing/moving windows).

Change-Id: Ia53521b1bd4d07400dba8280fad8cde3ea7cf9e4

src/bin/e_comp_wl.c

index 7b9e435a051f4fe272eb068c2f0f6fed74afd3fa..3892d66e54de25989e4c1ff206a79e7e51c6b8c2 100644 (file)
@@ -957,6 +957,7 @@ _e_comp_wl_device_send_axis(const char *dev_name, Evas_Device_Class dev_class, E
    wl_fixed_t f_value;
 
    if (!ec) return;
+   if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (!ec->comp_data || !ec->comp_data->surface) return;
 
@@ -1232,6 +1233,7 @@ _e_comp_wl_send_touch_move(E_Client *ec, int idx, int canvas_x, int canvas_y, ui
    wl_fixed_t x, y;
 
    if (!ec) return;
+   if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (!ec->comp_data || !ec->comp_data->surface) return;
 
@@ -1256,6 +1258,7 @@ _e_comp_wl_send_mouse_move(E_Client *ec, int x, int y, unsigned int timestamp)
    Eina_List *l;
 
    if (!ec) return;
+   if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (!ec->comp_data || !ec->comp_data->surface) return;
 
@@ -1308,7 +1311,6 @@ _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
    e_comp->wl_comp_data->ptr.y = wl_fixed_from_int(ev->cur.canvas.y);
 
    if (!(ec = data)) return;
-   if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if ((ec->ignored) && (!ec->remote_surface.provider)) return;
    if (!ec->comp_data || !ec->comp_data->surface) return;