aboutsummaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authorokan2009-06-20 00:55:41 +0000
committerokan2009-06-20 00:55:41 +0000
commitc54416ae163702858ce97808753af16c8c9b5921 (patch)
treee9d3394584e6cb28ee5e25f556f7ce000bb9cdc6 /input.c
parentc6af5e9b967797d315037b26aa05fec5b3e6ef44 (diff)
downloadcwm-c54416ae163702858ce97808753af16c8c9b5921.tar.gz
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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/input.c b/input.c
index cb08847..6471452 100644
--- a/input.c
+++ b/input.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.
*
- * $Id: input.c,v 1.7 2008/07/11 14:21:28 okan Exp $
+ * $Id: input.c,v 1.8 2009/06/20 00:55:42 okan Exp $
*/
#include "headers.h"
@@ -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) {