Enlightenment CVS committal

Author  : urandom
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        Ecore_X.h ecore_x.c ecore_x_events.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/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -3 -r1.197 -r1.198
--- Ecore_X.h   28 Mar 2008 14:38:35 -0000      1.197
+++ Ecore_X.h   30 May 2008 22:30:57 -0000      1.198
@@ -298,8 +298,10 @@
    char   *keysymbol;
    char   *key_compose;
    int     modifiers;
+   int    same_screen;
    Ecore_X_Window  win;
    Ecore_X_Window  event_win;
+   Ecore_X_Window  root_win;
    Ecore_X_Time    time;
 };
 
@@ -309,8 +311,10 @@
    char   *keysymbol;
    char   *key_compose;
    int     modifiers;
+   int    same_screen;
    Ecore_X_Window  win;
    Ecore_X_Window  event_win;
+   Ecore_X_Window  root_win;
    Ecore_X_Time    time;
 };
 
@@ -319,11 +323,13 @@
    int     button;
    int     modifiers;
    int     x, y;
+   int    same_screen;
    struct {
       int  x, y;
    } root;
    Ecore_X_Window  win;
    Ecore_X_Window  event_win;
+   Ecore_X_Window  root_win;
    Ecore_X_Time    time;
    unsigned int    double_click : 1;
    unsigned int    triple_click : 1;
@@ -334,11 +340,13 @@
    int     button;
    int     modifiers;
    int     x, y;
+   int    same_screen;
    struct {
       int  x, y;
    } root;
    Ecore_X_Window  win;
    Ecore_X_Window  event_win;
+   Ecore_X_Window  root_win;
    Ecore_X_Time    time;
    unsigned int    double_click : 1;
    unsigned int    triple_click : 1;
@@ -348,11 +356,13 @@
 {
    int     modifiers;
    int     x, y;
+   int    same_screen;
    struct {
       int  x, y;
    } root;
    Ecore_X_Window  win;
    Ecore_X_Window  event_win;
+   Ecore_X_Window  root_win;
    Ecore_X_Time    time;
 };
 
@@ -360,13 +370,15 @@
 {
    int                  modifiers;
    int                  x, y;
+   int                 same_screen;
    struct {
       int  x, y;
    } root;
    Ecore_X_Window               win;
    Ecore_X_Window               event_win;
-   Ecore_X_Event_Mode   mode;
-   Ecore_X_Event_Detail detail;
+   Ecore_X_Window              root_win;
+   Ecore_X_Event_Mode          mode;
+   Ecore_X_Event_Detail                detail;
    Ecore_X_Time                 time;
 };
 
@@ -374,13 +386,15 @@
 {
    int                  modifiers;
    int                  x, y;
+   int                 same_screen;
    struct {
       int  x, y;
    } root;
    Ecore_X_Window               win;
    Ecore_X_Window               event_win;
-   Ecore_X_Event_Mode   mode;
-   Ecore_X_Event_Detail detail;
+   Ecore_X_Window              root_win;
+   Ecore_X_Event_Mode          mode;
+   Ecore_X_Event_Detail                detail;
    Ecore_X_Time                 time;
 };
 
@@ -390,6 +404,7 @@
    int z; /* ...,-2,-1 = down, 1,2,... = up */
    int modifiers;
    int x, y;
+   int same_screen;
 
    struct {
       int x, y;
@@ -397,6 +412,7 @@
 
    Ecore_X_Window win;
    Ecore_X_Window event_win;
+   Ecore_X_Window root_win;
    Ecore_X_Time   time;
 };
 
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -3 -r1.130 -r1.131
--- ecore_x.c   16 Dec 2007 01:41:15 -0000      1.130
+++ ecore_x.c   30 May 2008 22:30:57 -0000      1.131
@@ -1486,10 +1486,11 @@
 ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
 {
    Window rwin, cwin;
-   int rx, ry, wx, wy;
+   int rx, ry, wx, wy, ret;
    unsigned int mask;
    
-   XQueryPointer(_ecore_x_disp, win, &rwin, &cwin, &rx, &ry, &wx, &wy, &mask);
+   ret = XQueryPointer(_ecore_x_disp, win, &rwin, &cwin, &rx, &ry, &wx, &wy, 
&mask);
+   if (!ret) wx = wy = -1;
    if (x) *x = wx;
    if (y) *y = wy;
 }
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- ecore_x_events.c    3 May 2008 08:15:16 -0000       1.101
+++ ecore_x_events.c    30 May 2008 22:30:57 -0000      1.102
@@ -228,6 +228,8 @@
    e->event_win = xevent->xkey.window;
    e->time = xevent->xkey.time;
    e->modifiers = xevent->xkey.state;
+   e->same_screen = xevent->xkey.same_screen;
+   e->root_win = xevent->xkey.root;
    _ecore_x_event_last_time = e->time;
    ecore_event_add(ECORE_X_EVENT_KEY_DOWN, e, _ecore_x_event_free_key_down, 
NULL);
 }
@@ -279,6 +281,8 @@
    e->event_win = xevent->xkey.window;
    e->time = xevent->xkey.time;
    e->modifiers = xevent->xkey.state;
+   e->same_screen = xevent->xkey.same_screen;
+   e->root_win = xevent->xkey.root;
    _ecore_x_event_last_time = e->time;
    ecore_event_add(ECORE_X_EVENT_KEY_UP, e, _ecore_x_event_free_key_up, NULL);
 }
@@ -331,6 +335,8 @@
          e->win = xevent->xbutton.window;
        
        e->event_win = xevent->xbutton.window;
+       e->same_screen = xevent->xbutton.same_screen;
+       e->root_win = xevent->xbutton.root;
        e->time = xevent->xbutton.time;
        _ecore_x_event_last_time = e->time;
        _ecore_x_event_last_win = e->win;
@@ -374,6 +380,8 @@
             e->root.y = xevent->xbutton.y_root;
             if (xevent->xbutton.subwindow) e->win = xevent->xbutton.subwindow;
             else e->win = xevent->xbutton.window;
+            e->same_screen = xevent->xbutton.same_screen;
+            e->root_win = xevent->xbutton.root;
             e->event_win = xevent->xbutton.window;
             e->time = xevent->xbutton.time;
             _ecore_x_event_last_time = e->time;
@@ -405,6 +413,8 @@
             e->root.y = xevent->xbutton.y_root;
             if (xevent->xbutton.subwindow) e->win = xevent->xbutton.subwindow;
             else e->win = xevent->xbutton.window;
+            e->same_screen = xevent->xbutton.same_screen;
+            e->root_win = xevent->xbutton.root;
             e->event_win = xevent->xbutton.window;
             e->time = xevent->xbutton.time;
             if (e->win == e->event_win)
@@ -495,6 +505,8 @@
             e->root.y = xevent->xbutton.y_root;
             if (xevent->xbutton.subwindow) e->win = xevent->xbutton.subwindow;
             else e->win = xevent->xbutton.window;
+            e->same_screen = xevent->xbutton.same_screen;
+            e->root_win = xevent->xbutton.root;
             e->event_win = xevent->xbutton.window;
             e->time = xevent->xbutton.time;
             _ecore_x_event_last_time = e->time;
@@ -516,6 +528,8 @@
             e->root.y = xevent->xbutton.y_root;
             if (xevent->xbutton.subwindow) e->win = xevent->xbutton.subwindow;
             else e->win = xevent->xbutton.window;
+            e->same_screen = xevent->xbutton.same_screen;
+            e->root_win = xevent->xbutton.root;
             e->event_win = xevent->xbutton.window;
             e->time = xevent->xbutton.time;
              _ecore_x_mouse_up_count++;
@@ -561,6 +575,8 @@
    e->root.y = xevent->xmotion.y_root;
    if (xevent->xmotion.subwindow) e->win = xevent->xmotion.subwindow;
    else e->win = xevent->xmotion.window;
+   e->same_screen = xevent->xmotion.same_screen;
+   e->root_win = xevent->xmotion.root;
    e->event_win = xevent->xmotion.window;
    e->time = xevent->xmotion.time;
    _ecore_x_event_last_time = e->time;
@@ -589,6 +605,8 @@
        e->root.y = xevent->xcrossing.y_root;
        if (xevent->xcrossing.subwindow) e->win = xevent->xcrossing.subwindow;
        else e->win = xevent->xcrossing.window;
+       e->same_screen = xevent->xcrossing.same_screen;
+       e->root_win = xevent->xcrossing.root;
        e->event_win = xevent->xcrossing.window;
        e->time = xevent->xcrossing.time;
        _ecore_x_event_last_time = e->time;
@@ -609,6 +627,8 @@
        e->root.y = xevent->xcrossing.y_root;
        if (xevent->xcrossing.subwindow) e->win = xevent->xcrossing.subwindow;
        else e->win = xevent->xcrossing.window;
+       e->same_screen = xevent->xcrossing.same_screen;
+       e->root_win = xevent->xcrossing.root;
        e->event_win = xevent->xcrossing.window;
        if      (xevent->xcrossing.mode == NotifyNormal) e->mode = 
ECORE_X_EVENT_MODE_NORMAL;
        else if (xevent->xcrossing.mode == NotifyGrab)   e->mode = 
ECORE_X_EVENT_MODE_GRAB;
@@ -639,6 +659,8 @@
        e->root.y = xevent->xcrossing.y_root;
        if (xevent->xcrossing.subwindow) e->win = xevent->xcrossing.subwindow;
        else e->win = xevent->xcrossing.window;
+       e->same_screen = xevent->xcrossing.same_screen;
+       e->root_win = xevent->xcrossing.root;
        e->event_win = xevent->xcrossing.window;
        e->time = xevent->xcrossing.time;
        _ecore_x_event_last_time = e->time;
@@ -659,6 +681,8 @@
        e->root.y = xevent->xcrossing.y_root;
        if (xevent->xcrossing.subwindow) e->win = xevent->xcrossing.subwindow;
        else e->win = xevent->xcrossing.window;
+       e->same_screen = xevent->xcrossing.same_screen;
+       e->root_win = xevent->xcrossing.root;
        e->event_win = xevent->xcrossing.window;
        if      (xevent->xcrossing.mode == NotifyNormal) e->mode = 
ECORE_X_EVENT_MODE_NORMAL;
        else if (xevent->xcrossing.mode == NotifyGrab)   e->mode = 
ECORE_X_EVENT_MODE_GRAB;



-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to