discomfitor pushed a commit to branch master.

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

commit 0ff2a408d31ff5072e4137841b5bcd279436bf95
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Jan 28 20:43:19 2014 -0500

    force stacking for all new X clients during add event
    
    this fixes a race condition when windows open simultaneously and then are 
stacked under each other: the previous result was that they would end up 
hanging out at the top of the window stack (above all windows) until another 
window was raised above them. now they stack as expected
---
 src/bin/e_comp_x.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 4aae315..dc90457 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -1086,6 +1086,18 @@ _e_comp_x_client_evas_init(E_Client *ec)
 }
 
 static Eina_Bool
+_e_comp_x_object_add(void *d EINA_UNUSED, int t EINA_UNUSED, 
E_Event_Comp_Object *ev)
+{
+   E_Client *ec;
+
+   ec = e_comp_object_client_get(ev->comp_object);
+   if (!ec) return ECORE_CALLBACK_RENEW;
+   _e_comp_x_client_evas_init(ec);
+   _e_comp_x_client_stack(ec);
+   return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
 _e_comp_x_show_request(void *data EINA_UNUSED, int type EINA_UNUSED, 
Ecore_X_Event_Window_Show_Request *ev)
 {
    E_Client *ec;
@@ -5081,6 +5093,8 @@ e_comp_x_init(void)
      }
    ecore_x_screensaver_event_listen_set(1);
 
+   E_LIST_HANDLER_APPEND(handlers, E_EVENT_COMP_OBJECT_ADD, 
_e_comp_x_object_add, NULL);
+
    E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_DESTROY, 
_e_comp_x_destroy, NULL);
    E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_SHOW, _e_comp_x_show, 
NULL);
    E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_SHOW_REQUEST, 
_e_comp_x_show_request, NULL);

-- 


Reply via email to