aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2021-03-09 00:34:00 -0500
committerDerek Stevens <nilix@nilfm.cc>2021-03-09 00:34:00 -0500
commitae878964213b0a86f01c722114729dd4560f2c43 (patch)
tree3de0ad7feed928710b122fb57d169a9dfb2a3d30
parent22f9147cabd1a1241ab45448a7f9c72ea537aa44 (diff)
key.c: fix unguarded else ifs for virt switching
-rw-r--r--key.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/key.c b/key.c
index bd96264..81d957b 100644
--- a/key.c
+++ b/key.c
@@ -538,7 +538,7 @@ void keypress(XKeyEvent* e) {
#endif
/* center snap */
-#ifdef CENTERSNAP_KEY
+#ifdef SNAPCENTER_KEY
else if (e->keycode == ccode && (e->state & SHORTCUTMOD) == (MODBITS)) {
if ((e->state & ShiftMask) == (1 << 0)) {
#ifdef CENTERVMAX
@@ -590,21 +590,23 @@ void keypress(XKeyEvent* e) {
/* switch virts */
#ifdef NEXTVIRT_KEY
- else if (e->keycode == rightcode && (e->state & SHORTCUTMOD) == (MODBITS))
+ else if (e->keycode == rightcode && (e->state & SHORTCUTMOD) == (MODBITS)) {
if (numvirtuals > 1)
if (virt < numvirtuals - 1)
switch_to(virt + 1);
else
switch_to(0);
+ }
#endif
#ifdef PREVVIRT_KEY
- else if (e->keycode == leftcode && (e->state & SHORTCUTMOD) == (MODBITS))
+ else if (e->keycode == leftcode && (e->state & SHORTCUTMOD) == (MODBITS)) {
if (numvirtuals > 1)
if (virt > 0)
switch_to(virt - 1);
else
switch_to(numvirtuals - 1);
+ }
#endif
XAllowEvents(dpy, SyncKeyboard, e->time);