diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2013-07-15 14:50:45 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2013-07-15 14:50:45 +0000 |
commit | be70e602e97b58ccaeb6051e52a64636ab31aa96 (patch) | |
tree | 500636b620782d3fde57fa98c490c7306257bed1 /app/cwm/client.c | |
parent | 3a2a61063bb13507d6208279c6b7a501cd8fb92c (diff) |
simplify atom handling; allows us to limit to one round-trip to server
for gathering Atoms.
Diffstat (limited to 'app/cwm/client.c')
-rw-r--r-- | app/cwm/client.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c index ce870fe27..7fc8a4a8a 100644 --- a/app/cwm/client.c +++ b/app/cwm/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.134 2013/06/10 21:37:30 okan Exp $ + * $OpenBSD: client.c,v 1.135 2013/07/15 14:50:44 okan Exp $ */ #include <sys/param.h> @@ -529,9 +529,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].atom) + if (p[i] == cwmh[WM_DELETE_WINDOW]) cc->xproto |= _WM_DELETE_WINDOW; - else if (p[i] == cwmh[WM_TAKE_FOCUS].atom) + else if (p[i] == cwmh[WM_TAKE_FOCUS]) cc->xproto |= _WM_TAKE_FOCUS; } XFree(p); @@ -546,7 +546,7 @@ client_msg(struct client_ctx *cc, Atom proto) bzero(&cm, sizeof(cm)); cm.type = ClientMessage; cm.window = cc->win; - cm.message_type = cwmh[WM_PROTOCOLS].atom; + cm.message_type = cwmh[WM_PROTOCOLS]; cm.format = 32; cm.data.l[0] = proto; cm.data.l[1] = CurrentTime; @@ -558,7 +558,7 @@ void client_send_delete(struct client_ctx *cc) { if (cc->xproto & _WM_DELETE_WINDOW) - client_msg(cc, cwmh[WM_DELETE_WINDOW].atom); + client_msg(cc, cwmh[WM_DELETE_WINDOW]); else XKillClient(X_Dpy, cc->win); } @@ -569,7 +569,7 @@ client_setname(struct client_ctx *cc) struct winname *wn; char *newname; - if (!xu_getstrprop(cc->win, ewmh[_NET_WM_NAME].atom, &newname)) + if (!xu_getstrprop(cc->win, ewmh[_NET_WM_NAME], &newname)) if (!xu_getstrprop(cc->win, XA_WM_NAME, &newname)) newname = xstrdup(""); @@ -841,7 +841,7 @@ client_getmwmhints(struct client_ctx *cc) struct mwm_hints *mwmh; if (xu_getprop(cc->win, - cwmh[_MOTIF_WM_HINTS].atom, cwmh[_MOTIF_WM_HINTS].atom, + cwmh[_MOTIF_WM_HINTS], cwmh[_MOTIF_WM_HINTS], PROP_MWM_HINTS_ELEMENTS, (u_char **)&mwmh) == MWM_NUMHINTS) if (mwmh->flags & MWM_HINTS_DECORATIONS && !(mwmh->decorations & MWM_DECOR_ALL) && |