about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-14 08:14:41 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-14 08:14:41 +0100
commit64cfebc5e7d005dfff93a2468df860522fad085a (patch)
treec7d6a4bedfed8d317d17cbade8cf90b7211fd5fa
parent7a095d0ce241698d8b3ea896499031f1d72b622e (diff)
downloaddwm-64cfebc5e7d005dfff93a2468df860522fad085a.tar.gz
made configurerequest more tidy
-rw-r--r--event.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/event.c b/event.c
index a2df33f..9a91d49 100644
--- a/event.c
+++ b/event.c
@@ -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);
9' href='#n169'>169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280