about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-31 08:48:04 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-31 08:48:04 +0200
commit4c368bcd24172166aab32948fc63feaa6a1bec93 (patch)
treedddc175fd0f072d6b7ea09a9b91cbcdf8f9f64d6
parent9927b9e64253643f409bd1ef22349cf4e9ca7727 (diff)
downloaddwm-4c368bcd24172166aab32948fc63feaa6a1bec93.tar.gz
applied sanders patch to remove unnecessary commit()
-rw-r--r--config.mk2
-rw-r--r--tag.c15
-rw-r--r--view.c8
3 files changed, 9 insertions, 16 deletions
diff --git a/config.mk b/config.mk
index 262fbde..af775ae 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
 # dwm version
-VERSION = 1.2
+VERSION = 1.3
 
 # Customize below to fit your system
 
diff --git a/tag.c b/tag.c
index b7c06de..dcda6dc 100644
--- a/tag.c
+++ b/tag.c
@@ -30,17 +30,6 @@ RULES
 static RReg *rreg = NULL;
 static unsigned int len = 0;
 
-static void
-commit()
-{
-	/* asserts sel != NULL */
-	settitle(sel);
-	if(!isvisible(sel))
-		arrange(NULL);
-	else
-		drawstatus();
-}
-
 /* extern */
 
 Client *
@@ -132,7 +121,7 @@ tag(Arg *arg)
 	for(i = 0; i < ntags; i++)
 		sel->tags[i] = False;
 	sel->tags[arg->i] = True;
-	commit();
+	arrange(NULL);
 }
 
 void
@@ -147,5 +136,5 @@ toggletag(Arg *arg)
 	for(i = 0; i < ntags && !sel->tags[i]; i++);
 	if(i == ntags)
 		sel->tags[arg->i] = True;
-	commit();
+	arrange(NULL);
 }
diff --git a/view.c b/view.c
index 424ee5a..aa0a23a 100644
--- a/view.c
+++ b/view.c
@@ -67,7 +67,9 @@ dofloat(Arg *arg)
 		else
 			ban(c);
 	}
-	if((sel = getnext(clients)))
+	if(!sel || !isvisible(sel))
+		sel = getnext(clients);
+	if(sel)
 		focus(sel);
 	else
 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
@@ -130,7 +132,9 @@ dotile(Arg *arg)
 		else
 			ban(c);
 	}
-	if((sel = getnext(clients)))
+	if(!sel || !isvisible(sel))
+		sel = getnext(clients);
+	if(sel)
 		focus(sel);
 	else
 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
> 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 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388