summary refs log tree commit diff
path: root/input.c
diff options
context:
space:
mode:
authorokan <okan>2009-06-20 00:55:41 +0000
committerokan <okan>2009-06-20 00:55:41 +0000
commitbcc0f73bb68bab7bff0e0c969b81fe7547caa58a (patch)
tree9375d5da09799b5501da624a20855a96a23f92b0 /input.c
parent58d12134b1679a9172a7131abffc27769780b9c5 (diff)
downloadcwm-bcc0f73bb68bab7bff0e0c969b81fe7547caa58a.tar.gz
cwm-bcc0f73bb68bab7bff0e0c969b81fe7547caa58a.tar.xz
cwm-bcc0f73bb68bab7bff0e0c969b81fe7547caa58a.zip
compact a bit by condensing a few if-else's; from Thomas Pfaff
"go on then" oga@
Diffstat (limited to 'input.c')
-rw-r--r--input.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/input.c b/input.c
index b94c968..b9c5185 100644
--- a/input.c
+++ b/input.c
@@ -29,10 +29,7 @@ input_keycodetrans(KeyCode kc, u_int state, enum ctltype *ctl, char *chr)
 	*ctl = CTL_NONE;
 	*chr = '\0';
 
-	if (state & ShiftMask)
-		ks = XKeycodeToKeysym(X_Dpy, kc, 1);
-	else
-		ks = XKeycodeToKeysym(X_Dpy, kc, 0);
+	ks = XKeycodeToKeysym(X_Dpy, kc, (state & ShiftMask) ? 1 : 0);
 
 	/* Look for control characters. */
 	switch (ks) {