devilhorns pushed a commit to branch feature/wayland/multi-output.

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

commit 1fccd31c73696e5950ae3eb170f52a3337fe1c48
Author: Derek Foreman <[email protected]>
Date:   Wed Apr 18 12:55:35 2018 -0500

    Defer initial xdg configure for iconified wayland clients
    
    Under wayland, if a client declares itself iconified before its first
    commit, we should wait until it's no longer iconified before sending it
    a configure.  This way it can avoid uselessly rendering buffers that
    will never be displayed.
    
    ref T6834
---
 src/bin/e_comp_wl.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 1c0bdccd5..a9adad104 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1559,7 +1559,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
              ec->want_focus |= ec->icccm.accepts_focus && (!ec->override);
           }
      }
-   else if (ec->comp_data->need_xdg_configure && ec->comp_data->shell.surface)
+   else if (ec->comp_data->need_xdg_configure && ec->comp_data->shell.surface 
&& !ec->iconic)
      _e_comp_wl_configure_send(ec, 0);
 
    state->sx = 0;
@@ -2980,6 +2980,17 @@ end:
    _e_comp_wl_gl_shutdown();
 }
 
+static Eina_Bool
+_e_comp_wl_cb_uniconify(void *data EINA_UNUSED, int type EINA_UNUSED, void 
*event)
+{
+   E_Event_Client *ev = event;
+   E_Client *ec = ev->ec;
+
+   if (ec->comp_data->need_xdg_configure)
+      ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, 0, 0, 
0);
+   return ECORE_CALLBACK_PASS_ON;
+}
+
 /* public functions */
 
 /**
@@ -3038,6 +3049,9 @@ e_comp_wl_init(void)
    E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_MOVE,
                          _e_comp_wl_cb_mouse_move, NULL);
 
+   E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_UNICONIFY,
+                         _e_comp_wl_cb_uniconify, NULL);
+
    /* add hooks to catch e_client events */
    e_client_hook_add(E_CLIENT_HOOK_NEW_CLIENT, _e_comp_wl_client_cb_new, NULL);
    e_client_hook_add(E_CLIENT_HOOK_DEL, _e_comp_wl_client_cb_del, NULL);

-- 


Reply via email to