kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=3d86eb55fa022fd7731bcbc75500229bae414345

commit 3d86eb55fa022fd7731bcbc75500229bae414345
Author: Kim Woelders <k...@woelders.dk>
Date:   Sat Nov 23 17:08:12 2013 +0100

    Wrap XGetWindowAttributes().
---
 src/eobj.c  |  2 +-
 src/ewins.c |  2 +-
 src/icccm.c |  2 +-
 src/x.c     | 12 +++++++++---
 src/xwin.h  |  1 +
 5 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/eobj.c b/src/eobj.c
index a591ef9..65c2291 100644
--- a/src/eobj.c
+++ b/src/eobj.c
@@ -316,7 +316,7 @@ EobjRegister(Window xwin, int type)
    if (eo)
       return eo;
 
-   if (!XGetWindowAttributes(disp, xwin, &attr))
+   if (!EXGetWindowAttributes(xwin, &attr))
       return NULL;
 
    if (type == EOBJ_TYPE_EXT && !attr.override_redirect)
diff --git a/src/ewins.c b/src/ewins.c
index 459c4de..bd5e9b0 100644
--- a/src/ewins.c
+++ b/src/ewins.c
@@ -2240,7 +2240,7 @@ EwinsManage(void)
        if (EobjListStackFind(xwin))
           continue;
 
-       if (!XGetWindowAttributes(disp, xwin, &attr))
+       if (!EXGetWindowAttributes(xwin, &attr))
           continue;
 
        if (attr.map_state == IsUnmapped)
diff --git a/src/icccm.c b/src/icccm.c
index 88f7dfd..dabb8f0 100644
--- a/src/icccm.c
+++ b/src/icccm.c
@@ -353,7 +353,7 @@ ICCCM_Cmap(EWin * ewin)
      {
        for (i = 0; i < num; i++)
          {
-            if (XGetWindowAttributes(disp, wlist[i], &xwa))
+            if (EXGetWindowAttributes(wlist[i], &xwa))
               {
                  if (xwa.colormap != dcmap)
                    {
diff --git a/src/x.c b/src/x.c
index 23dbe06..4e097f4 100644
--- a/src/x.c
+++ b/src/x.c
@@ -709,7 +709,7 @@ ERegisterWindow(Window xwin, XWindowAttributes * pxwa)
    if (!pxwa)
      {
        pxwa = &xwa;
-       if (!XGetWindowAttributes(disp, xwin, pxwa))
+       if (!EXGetWindowAttributes(xwin, pxwa))
           goto done;
      }
 
@@ -836,6 +836,12 @@ EMapRaised(Win win)
 }
 
 int
+EXGetWindowAttributes(Window xwin, XWindowAttributes * pxwa)
+{
+   return XGetWindowAttributes(disp, xwin, pxwa);
+}
+
+int
 EXGetGeometry(Drawable draw, Window * root_return, int *x, int *y,
              int *w, int *h, int *bw, int *depth)
 {
@@ -1097,7 +1103,7 @@ ESelectInputChange(Win win, unsigned int set, unsigned 
int clear)
 #else
    XWindowAttributes   xwa;
 
-   XGetWindowAttributes(disp, win->xwin, &xwa);
+   EXGetWindowAttributes(win->xwin, &xwa);
    xwa.your_event_mask |= set;
    xwa.your_event_mask &= ~clear;
    XSelectInput(disp, win->xwin, xwa.your_event_mask);
@@ -1949,7 +1955,7 @@ EWindowGetPixmap(const Win win)
 {
    XWindowAttributes   xwa;
 
-   if (XGetWindowAttributes(disp, win->xwin, &xwa) == 0 ||
+   if (EXGetWindowAttributes(win->xwin, &xwa) == 0 ||
        xwa.map_state == IsUnmapped)
       return None;
 
diff --git a/src/xwin.h b/src/xwin.h
index 7049c15..41406c5 100644
--- a/src/xwin.h
+++ b/src/xwin.h
@@ -248,6 +248,7 @@ unsigned int        EAllocColor(Colormap cmap, unsigned int 
argb);
   do { a = _A16(c); r = _R16(c); g = _G16(c); b = _B16(c); } while (0)
 
 Window              EXWindowGetParent(Window xwin);
+int                 EXGetWindowAttributes(Window w, XWindowAttributes * pxwa);
 int                 EXGetGeometry(Window xwin, Window * root_return,
                                  int *x, int *y, int *w, int *h, int *bw,
                                  int *depth);

-- 


Reply via email to