[hackers] [dwm] made configurerequest more tidy

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Wed Feb 14 08:18:26 2007

changeset: 756:df3ea2f76f54
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Wed Feb 14 08:14:41 2007 +0100
summary: made configurerequest more tidy

diff -r 887d74605df8 -r df3ea2f76f54 event.c
--- a/event.c Tue Feb 13 22:53:58 2007 +0100
+++ b/event.c Wed Feb 14 08:14:41 2007 +0100
@@ -173,12 +173,17 @@ configurerequest(XEvent *e) {
 
         if((c = getclient(ev->window))) {
                 c->ismax = False;
- c->border = (ev->value_mask & CWBorderWidth) ? ev->border_width : c->border;
+ if(ev->value_mask & CWBorderWidth)
+ c->border = ev->border_width;
                 if(c->isfixed || c->isfloat || (arrange == dofloat)) {
- c->x = (ev->value_mask & CWX) ? ev->x : c->x;
- c->y = (ev->value_mask & CWY) ? ev->y : c->y;
- c->w = (ev->value_mask & CWWidth) ? ev->width : c->w;
- c->h = (ev->value_mask & CWHeight) ? ev->height : c->h;
+ if(ev->value_mask & CWX)
+ c->x = ev->x;
+ if(ev->value_mask & CWY)
+ c->y = ev->y;
+ if(ev->value_mask & CWWidth)
+ c->w = ev->width;
+ if(ev->value_mask & CWHeight)
+ c->h = ev->height;
                         if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight)))
                                 configure(c);
                         resize(c, False);
Received on Wed Feb 14 2007 - 08:18:26 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:18 UTC