diff options
author | okan | 2009-06-20 00:55:41 +0000 |
---|---|---|
committer | okan | 2009-06-20 00:55:41 +0000 |
commit | c54416ae163702858ce97808753af16c8c9b5921 (patch) | |
tree | e9d3394584e6cb28ee5e25f556f7ce000bb9cdc6 /input.c | |
parent | c6af5e9b967797d315037b26aa05fec5b3e6ef44 (diff) | |
download | cwm-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.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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) { |