discomfitor pushed a commit to branch enlightenment-0.20.

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

commit d1568b832f09a30a7560e915efea042c54f687e0
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Mar 24 16:41:18 2016 -0400

    redo wayland client unignore mechanism
    
    wayland clients were previously set as ignored until they obtained
    a shell surface in order to avoid early execution of things like placement.
    
    this had no effect.
    
    the ignore must last until the first commit, at which point surfaces have 
been
    sized and can be placed accurately without needing to move the surface 
around
    a lot of times due to resize/frame adjust/birthdays
---
 src/bin/e_comp_wl.c                       | 23 +++++++++++------------
 src/modules/wl_desktop_shell/e_mod_main.c | 12 ++----------
 2 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 8d0088d..c55f8b1 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1023,7 +1023,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
 {
    Eina_Bool first = EINA_FALSE;
    Eina_Rectangle *dmg;
-   Eina_Bool ignored, placed = EINA_TRUE;
+   Eina_Bool placed = EINA_TRUE;
    int x = 0, y = 0, w, h;
 
    first = !e_pixmap_usable_get(ec->pixmap);
@@ -1031,7 +1031,14 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
    if (first && e_client_has_xwindow(ec))
      first = !e_pixmap_usable_get(e_comp_x_client_pixmap_get(ec));
 #endif
-   ignored = ec->ignored;
+
+   if (ec->ignored && (ec->comp_data->shell.surface || ec->internal))
+     {
+        EC_CHANGED(ec);
+        ec->new_client = 1;
+        e_comp->new_clients++;
+        e_client_unignore(ec);
+     }
 
    if (state->new_attach)
      _e_comp_wl_surface_state_attach(ec, state);
@@ -1071,7 +1078,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 (ec->comp_data->cursor || e_client_has_xwindow(ec) ||
+             else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || 
ec->internal ||
                       (ec->comp_data->sub.data && 
ec->comp_data->sub.data->parent->comp_data->mapped) ||
                       (ec == e_comp_wl->drag_client))
                {
@@ -1087,7 +1094,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 (ec->comp_data->cursor || e_client_has_xwindow(ec) ||
+             else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || 
ec->internal ||
                       (ec->comp_data->sub.data && 
ec->comp_data->sub.data->parent->comp_data->mapped) ||
                       (ec == e_comp_wl->drag_client))
                {
@@ -1150,12 +1157,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
              ec->placed = placed;
              ec->want_focus |= ec->icccm.accepts_focus && (!ec->override);
           }
-        else if ((first) && (ec->placed) && (!ec->internal) && (!ec->override))
-          {
-             ec->x = ec->y = 0;
-             ec->placed = EINA_FALSE;
-             ec->new_client = EINA_TRUE;
-          }
      }
    state->sx = 0;
    state->sy = 0;
@@ -1167,8 +1168,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
                                            state->frames);
    state->frames = NULL;
 
-   ec->ignored = ignored;
-
    /* put state damages into surface */
    if ((!e_comp->nocomp) && (ec->frame))
      {
diff --git a/src/modules/wl_desktop_shell/e_mod_main.c 
b/src/modules/wl_desktop_shell/e_mod_main.c
index 748ba84..e3f5d7c 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -548,12 +548,7 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, 
struct wl_resource *reso
                                "No Pixmap Set On Surface");
         return;
      }
-
-   EC_CHANGED(ec);
-   ec->new_client = ec->netwm.ping = EINA_TRUE;
-   e_comp->new_clients++;
-   e_client_unignore(ec);
-
+   ec->netwm.ping = 1;
    /* get the client data */
    if (!(cdata = ec->comp_data))
      {
@@ -1111,10 +1106,7 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, 
struct wl_resource *resour
         return;
      }
 
-   EC_CHANGED(ec);
-   ec->new_client = ec->netwm.ping = EINA_TRUE;
-   e_comp->new_clients++;
-   e_client_unignore(ec);
+   ec->netwm.ping = 1;
 
    /* get the client data */
    if (!(cdata = ec->comp_data))

-- 


Reply via email to