diff options
author | Danny Baumann <dannybaumann@web.de> | 2008-06-07 14:52:14 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2008-06-07 14:52:14 +0200 |
commit | 82e20987416128f2c0c277cc4d94c016300d7abd (patch) | |
tree | 5d3b729f70225bc2640ba99a4bbb52d13f3f55ad /src | |
parent | d6948170d59208625128b014b0385722de606322 (diff) | |
parent | 0fb90dacfa787d3875e6ee8d1e6d9d578e417d9d (diff) |
Merge branch 'master' of git+ssh://maniac@git.freedesktop.org/git/xorg/app/compiz
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/window.c b/src/window.c index 2d29ff97..fdd61bcd 100644 --- a/src/window.c +++ b/src/window.c @@ -992,22 +992,15 @@ unsigned int getProtocols (CompDisplay *display, Window id) { - Atom actual; - int result, format; - unsigned long n, left; - unsigned char *data; - unsigned int protocols = 0; + Atom *protocol; + int count; + unsigned int protocols = 0; - result = XGetWindowProperty (display->display, id, display->wmProtocolsAtom, - 0L, 20L, FALSE, XA_ATOM, - &actual, &format, &n, &left, &data); - - if (result == Success && n && data) + if (XGetWMProtocols (display->display, id, &protocol, &count)) { - Atom *protocol = (Atom *) data; int i; - for (i = 0; i < n; i++) + for (i = 0; i < count; i++) { if (protocol[i] == display->wmDeleteWindowAtom) protocols |= CompWindowProtocolDeleteMask; @@ -1019,7 +1012,7 @@ getProtocols (CompDisplay *display, protocols |= CompWindowProtocolSyncRequestMask; } - XFree (data); + XFree (protocol); } return protocols; |