aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2013-11-08 17:35:12 +0000
committerokan2013-11-08 17:35:12 +0000
commit1650bfdc36cf23d6b48c970ccf7cbdf120419009 (patch)
tree8af8c6a82014af815435e6ac8ef9e2b12a7125d3 /client.c
parent5379033e1a0de6fed6027db68fae394eece9cf44 (diff)
downloadcwm-1650bfdc36cf23d6b48c970ccf7cbdf120419009.tar.gz
stash WMProtocols in flags
Diffstat (limited to '')
-rw-r--r--client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/client.c b/client.c
index 20d9d6a..1f2b2a4 100644
--- a/client.c
+++ b/client.c
@@ -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.
*
- * $OpenBSD: client.c,v 1.146 2013/11/05 00:55:42 okan Exp $
+ * $OpenBSD: client.c,v 1.147 2013/11/08 17:35:12 okan Exp $
*/
#include <sys/param.h>
@@ -212,11 +212,11 @@ client_setactive(struct client_ctx *cc, int fg)
if (fg) {
XInstallColormap(X_Dpy, cc->colormap);
if ((cc->flags & CLIENT_INPUT) ||
- ((cc->xproto & _WM_TAKE_FOCUS) == 0)) {
+ ((cc->flags & CLIENT_WM_TAKE_FOCUS) == 0)) {
XSetInputFocus(X_Dpy, cc->win,
RevertToPointerRoot, CurrentTime);
}
- if (cc->xproto & _WM_TAKE_FOCUS)
+ if (cc->flags & CLIENT_WM_TAKE_FOCUS)
client_msg(cc, cwmh[WM_TAKE_FOCUS]);
conf_grab_mouse(cc->win);
/*
@@ -532,9 +532,9 @@ client_wm_protocols(struct client_ctx *cc)
if (XGetWMProtocols(X_Dpy, cc->win, &p, &j)) {
for (i = 0; i < j; i++) {
if (p[i] == cwmh[WM_DELETE_WINDOW])
- cc->xproto |= _WM_DELETE_WINDOW;
+ cc->flags |= CLIENT_WM_DELETE_WINDOW;
else if (p[i] == cwmh[WM_TAKE_FOCUS])
- cc->xproto |= _WM_TAKE_FOCUS;
+ cc->flags |= CLIENT_WM_TAKE_FOCUS;
}
XFree(p);
}
@@ -559,7 +559,7 @@ client_msg(struct client_ctx *cc, Atom proto)
void
client_send_delete(struct client_ctx *cc)
{
- if (cc->xproto & _WM_DELETE_WINDOW)
+ if (cc->flags & CLIENT_WM_DELETE_WINDOW)
client_msg(cc, cwmh[WM_DELETE_WINDOW]);
else
XKillClient(X_Dpy, cc->win);