discomfitor pushed a commit to branch master.
commit a7c4552bbe092a4949bef69f9c417dddb53f6834
Author: Mike Blumenkrantz <[email protected]>
Date: Tue Aug 27 09:21:42 2013 +0100
fix manager show request handler to be global and fire before the comp
handler; fixes stacking and theme setting
---
src/bin/e_manager.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/bin/e_manager.c b/src/bin/e_manager.c
index 03580b7..b561279 100644
--- a/src/bin/e_manager.c
+++ b/src/bin/e_manager.c
@@ -48,6 +48,7 @@ EAPI int E_EVENT_MANAGER_COMP_SET = -1;
static Eina_List *managers = NULL;
static Eina_Hash *frame_extents = NULL;
static Ecore_Timer *timer_post_screensaver_lock = NULL;
+static Ecore_Event_Handler *_show_request_handler = NULL;
/* externally accessible functions */
EINTERN int
@@ -57,6 +58,8 @@ e_manager_init(void)
frame_extents = eina_hash_string_superfast_new(NULL);
E_EVENT_MANAGER_KEYS_GRAB = ecore_event_type_new();
E_EVENT_MANAGER_COMP_SET = ecore_event_type_new();
+ _show_request_handler =
ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST,
+
_e_manager_cb_window_show_request, NULL);
return 1;
}
@@ -64,6 +67,7 @@ EINTERN int
e_manager_shutdown(void)
{
E_FREE_LIST(managers, e_object_del);
+ E_FREE_FUNC(_show_request_handler, ecore_event_handler_del);
if (frame_extents)
{
@@ -106,8 +110,6 @@ e_manager_new(Ecore_X_Window root, int num)
}
managers = eina_list_append(managers, man);
- E_LIST_HANDLER_APPEND(man->handlers, ECORE_X_EVENT_WINDOW_SHOW_REQUEST,
- _e_manager_cb_window_show_request, man);
E_LIST_HANDLER_APPEND(man->handlers, ECORE_X_EVENT_WINDOW_CONFIGURE,
_e_manager_cb_window_configure, man);
E_LIST_HANDLER_APPEND(man->handlers, ECORE_EVENT_KEY_DOWN,
@@ -530,10 +532,10 @@ _e_manager_cb_window_show_request(void *data, int ev_type
__UNUSED__, void *ev)
E_Manager *man;
Ecore_X_Event_Window_Show_Request *e;
- man = data;
e = ev;
if (e_stolen_win_get(e->win)) return 1;
- if (ecore_x_window_parent_get(e->win) != man->root)
+ man = e_manager_find_by_root(ecore_x_window_parent_get(e->win));
+ if (!man)
return ECORE_CALLBACK_PASS_ON; /* try other handlers for this */
{
--
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk