Enlightenment CVS committal Author : urandom Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_manager.c Log Message: ecore_x: * in ecore_x_pointer_xy_get, fill x & y with '-1', if the pointer is not in the same screen as the given window * add 'same_screen' and 'root_win' information for the XEvents dealing with keyboard and mouse events e: * make sure e_manager_current_get returns the correct manager for the current screen * fix various modules to use the correct window, when dealing with events =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_manager.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -3 -r1.67 -r1.68 --- e_manager.c 9 Feb 2008 22:41:30 -0000 1.67 +++ e_manager.c 30 May 2008 22:30:56 -0000 1.68 @@ -17,6 +17,7 @@ static Evas_Bool _e_manager_frame_extents_free_cb(const Evas_Hash *hash __UNUSED__, const char *key __UNUSED__, void *data, void *fdata __UNUSED__); +static E_Manager *_e_manager_get_for_root(Ecore_X_Window root); #if 0 /* use later - maybe */ static int _e_manager_cb_window_destroy(void *data, int ev_type, void *ev); static int _e_manager_cb_window_hide(void *data, int ev_type, void *ev); @@ -456,6 +457,8 @@ { man = l->data; ecore_x_pointer_xy_get(man->win, &x, &y); + if (x == -1 && y == -1) + continue; if (E_INSIDE(x, y, man->x, man->y, man->w, man->h)) return man; } @@ -584,7 +587,9 @@ man = data; e = ev; + if (e->event_win != man->root) return 1; + if (e->root_win != man->root) man = _e_manager_get_for_root(e->root_win); if (e_bindings_key_down_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(man), ev)) return 0; return 1; @@ -593,11 +598,6 @@ static int _e_manager_cb_key_up(void *data, int ev_type __UNUSED__, void *ev) { - E_Manager *man; - Ecore_X_Event_Key_Up *e; - - man = data; - e = ev; return 1; } @@ -782,6 +782,24 @@ free(data); return 1; } + +static E_Manager * +_e_manager_get_for_root(Ecore_X_Window root) +{ + Evas_List *l; + E_Manager *man; + int x, y; + + if (!managers) return NULL; + for (l = managers; l; l = l->next) + { + man = l->data; + if (man->root == root) + return man; + } + return managers->data; +} + #if 0 /* use later - maybe */ static int _e_manager_cb_window_destroy(void *data, int ev_type, void *ev){return 1;} ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs