Index: lib/X11/GetWAttrs.c =================================================================== RCS file: /home/eich/cvs/xc/lib/X11/GetWAttrs.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 GetWAttrs.c --- lib/X11/GetWAttrs.c 22 Apr 2003 18:03:09 -0000 1.1.1.4 +++ lib/X11/GetWAttrs.c 24 Aug 2004 14:22:04 -0000 @@ -24,7 +24,6 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86$ */ #define NEED_REPLIES #include "Xlibint.h" @@ -84,10 +83,11 @@ return True; } -Status XGetWindowAttributes(dpy, w, attr) - register Display *dpy; - Window w; - XWindowAttributes *attr; +Status +_XGetWindowAttributes( + register Display *dpy, + Window w, + XWindowAttributes *attr) { xGetGeometryReply rep; register xResourceReq *req; @@ -96,7 +96,6 @@ _XAsyncHandler async; _XWAttrsState async_state; - LockDisplay(dpy); GetResReq(GetWindowAttributes, w, req); async_state.attr_seq = dpy->request; @@ -113,14 +112,10 @@ if (!_XReply (dpy, (xReply *)&rep, 0, xTrue)) { DeqAsyncHandler(dpy, &async); - UnlockDisplay(dpy); - SyncHandle(); return (0); } DeqAsyncHandler(dpy, &async); if (!async_state.attr) { - UnlockDisplay(dpy); - SyncHandle(); return (0); } attr->x = cvtINT16toInt (rep.x); @@ -138,8 +133,22 @@ break; } } + return(1); +} + +Status +XGetWindowAttributes( + Display *dpy, + Window w, + XWindowAttributes *attr) +{ + Status ret; + + LockDisplay(dpy); + ret = _XGetWindowAttributes(dpy, w, attr); UnlockDisplay(dpy); SyncHandle(); - return(1); + + return ret; } Index: lib/X11/Xlibint.h =================================================================== RCS file: /home/eich/cvs/xc/lib/X11/Xlibint.h,v retrieving revision 1.1.1.13 diff -u -r1.1.1.13 Xlibint.h --- lib/X11/Xlibint.h 6 Jul 2004 15:06:37 -0000 1.1.1.13 +++ lib/X11/Xlibint.h 24 Aug 2004 14:22:04 -0000 @@ -1298,6 +1298,11 @@ int n, int ordering); +Status _XGetWindowAttributes( + register Display *dpy, + Window w, + XWindowAttributes *attr); + _XFUNCPROTOEND #endif /* _XLIBINT_H_ */ Index: lib/X11/imDefLkup.c =================================================================== RCS file: /home/eich/cvs/xc/lib/X11/imDefLkup.c,v retrieving revision 1.1.1.8 diff -u -r1.1.1.8 imDefLkup.c --- lib/X11/imDefLkup.c 2 Dec 2003 18:40:30 -0000 1.1.1.8 +++ lib/X11/imDefLkup.c 24 Aug 2004 14:22:04 -0000 @@ -463,7 +463,7 @@ Xim im = (Xim )ic->core.im; XWindowAttributes atr; - if (!XGetWindowAttributes(im->core.display, ic->core.focus_window, &atr)) + if (!_XGetWindowAttributes(im->core.display, ic->core.focus_window, &atr)) return 0; return (EVENTMASK)atr.your_event_mask; }