diff options
author | okan | 2010-04-11 16:51:26 +0000 |
---|---|---|
committer | okan | 2010-04-11 16:51:26 +0000 |
commit | 9e65d6521af3fcd684942c774a2e30e1ad40b8bd (patch) | |
tree | aad95d0bb3946459a31ac3fd52e0ab6a63e1eedf /xutil.c | |
parent | 611c1bc4a75647429fd8d4f212302334743bff02 (diff) | |
download | cwm-9e65d6521af3fcd684942c774a2e30e1ad40b8bd.tar.gz |
clean up a few xu_* functions to just accept what they need (Window).
ok oga@
Diffstat (limited to 'xutil.c')
-rw-r--r-- | xutil.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: xutil.c,v 1.29 2009/12/15 04:10:42 okan Exp $ + * $Id: xutil.c,v 1.30 2010/04/11 16:51:26 okan Exp $ */ #include <sys/param.h> @@ -119,29 +119,29 @@ xu_key_ungrab(Window win, int mask, int keysym) } void -xu_sendmsg(struct client_ctx *cc, Atom atm, long val) +xu_sendmsg(Window win, Atom atm, long val) { XEvent e; memset(&e, 0, sizeof(e)); e.xclient.type = ClientMessage; - e.xclient.window = cc->win; + e.xclient.window = win; e.xclient.message_type = atm; e.xclient.format = 32; e.xclient.data.l[0] = val; e.xclient.data.l[1] = CurrentTime; - XSendEvent(X_Dpy, cc->win, False, 0, &e); + XSendEvent(X_Dpy, win, False, 0, &e); } int -xu_getprop(struct client_ctx *cc, Atom atm, Atom type, long len, u_char **p) +xu_getprop(Window win, Atom atm, Atom type, long len, u_char **p) { Atom realtype; u_long n, extra; int format; - if (XGetWindowProperty(X_Dpy, cc->win, atm, 0L, len, False, type, + if (XGetWindowProperty(X_Dpy, win, atm, 0L, len, False, type, &realtype, &format, &n, &extra, p) != Success || *p == NULL) return (-1); @@ -156,7 +156,7 @@ xu_getstate(struct client_ctx *cc, int *state) { long *p = NULL; - if (xu_getprop(cc, WM_STATE, WM_STATE, 2L, (u_char **)&p) <= 0) + if (xu_getprop(cc->win, WM_STATE, WM_STATE, 2L, (u_char **)&p) <= 0) return (-1); *state = (int)*p; |