discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=fbedd9dcac120ecb2ae3dc4057ea3f8c3748aad2

commit fbedd9dcac120ecb2ae3dc4057ea3f8c3748aad2
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Jan 20 15:55:10 2016 -0500

    automatically mark wayland cursor surfaces as visible during set_cursor
    
    a cursor client should be shown/hidden as needed despite its lack of a
    shell interface, and having a special flag to identify these types of
    surfaces makes it easier to do that
---
 src/bin/e_comp_wl.c       | 8 ++++----
 src/bin/e_comp_wl.h       | 1 +
 src/bin/e_comp_wl_input.c | 4 +++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 686e323..abe4225 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1070,7 +1070,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
           {
              if ((ec->comp_data->shell.surface) && 
(ec->comp_data->shell.unmap))
                ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
-             else if (e_client_has_xwindow(ec))
+             else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
                {
                   ec->visible = EINA_FALSE;
                   evas_object_hide(ec->frame);
@@ -1084,7 +1084,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
           {
              if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map))
                ec->comp_data->shell.map(ec->comp_data->shell.surface);
-             else if (e_client_has_xwindow(ec))
+             else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
                {
                   ec->visible = EINA_TRUE;
                   ec->ignored = 0;
@@ -2758,7 +2758,7 @@ e_comp_wl_surface_commit(E_Client *ec)
           {
              if ((ec->comp_data->shell.surface) && 
(ec->comp_data->shell.unmap))
                ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
-             else if (e_client_has_xwindow(ec))
+             else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
                {
                   ec->visible = EINA_FALSE;
                   evas_object_hide(ec->frame);
@@ -2772,7 +2772,7 @@ e_comp_wl_surface_commit(E_Client *ec)
           {
              if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map))
                ec->comp_data->shell.map(ec->comp_data->shell.surface);
-             else if (e_client_has_xwindow(ec))
+             else if (ec->comp_data->cursor || e_client_has_xwindow(ec))
                {
                   ec->visible = EINA_TRUE;
                   ec->ignored = 0;
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index a4426e1..d280eb3 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -300,6 +300,7 @@ struct _E_Comp_Wl_Client_Data
    Eina_Bool set_win_type : 1;
    Eina_Bool frame_update : 1;
    Eina_Bool maximize_pre : 1;
+   Eina_Bool cursor : 1;
 };
 
 struct _E_Comp_Wl_Output
diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c
index 19338b4..60ae274 100644
--- a/src/bin/e_comp_wl_input.c
+++ b/src/bin/e_comp_wl_input.c
@@ -59,12 +59,14 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client 
*client, struct wl_resou
    ec = wl_resource_get_user_data(surface_resource);
    if (!ec->re_manage)
      {
-        ec->re_manage = 1;
+        ec->comp_data->cursor = ec->re_manage = 1;
         ec->ignored = 0;
 
         ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1;
         ec->icccm.title = eina_stringshare_add("noshadow");
         evas_object_pass_events_set(ec->frame, 1);
+        evas_object_show(ec->frame);
+        ec->comp_data->mapped = 1;
         e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), 
ec));
         EC_CHANGED(ec);
      }

-- 


Reply via email to