Hi,
every function that's dealing with windows in ecore_x uses the root
window if the caller provides 0 for the window id.

I didn't check all of them, but at least one exception are the
ecore_x_event_mask_(un)set functions, which don't have this root window
fallback.

Should that fallback be put in these functions, too or is there a good
reason it's not in yet? :)

Patch attached, comments welcome ;p

-- 
Regards,
Tilman
Index: ecore_x_events.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.31
diff -u -r1.31 ecore_x_events.c
--- ecore_x_events.c    17 Aug 2004 20:10:28 -0000      1.31
+++ ecore_x_events.c    20 Aug 2004 19:28:11 -0000
@@ -18,6 +18,9 @@
    XWindowAttributes attr;
    XSetWindowAttributes s_attr;
 
+   if (!w)
+      w = DefaultRootWindow(_ecore_x_disp);
+
    memset(&attr, 0, sizeof(XWindowAttributes));
    XGetWindowAttributes(_ecore_x_disp, w, &attr);
    s_attr.event_mask = mask | attr.your_event_mask;
@@ -30,6 +33,9 @@
    XWindowAttributes attr;
    XSetWindowAttributes s_attr;
 
+   if (!w)
+      w = DefaultRootWindow(_ecore_x_disp);
+
    memset(&attr, 0, sizeof(XWindowAttributes));
    XGetWindowAttributes(_ecore_x_disp, w, &attr);
    s_attr.event_mask = attr.your_event_mask & ~mask;

Reply via email to