about summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2022-02-27 14:59:55 +0000
committerokan <okan>2022-02-27 14:59:55 +0000
commit7af3a7b8b6966d7c3b0a2fb2fcdb6be314bfd7c1 (patch)
tree5db3a53e3b439857a4646ded170d999850a1a7ea /conf.c
parent35b0da9202fbfd83662a0649313b5c4b8cb97f5e (diff)
parent4e73ce533c98c54a83fa24c71105bbb1b40a0803 (diff)
downloadcwm-7af3a7b8b6966d7c3b0a2fb2fcdb6be314bfd7c1.tar.gz
cwm-7af3a7b8b6966d7c3b0a2fb2fcdb6be314bfd7c1.tar.xz
cwm-7af3a7b8b6966d7c3b0a2fb2fcdb6be314bfd7c1.zip
cvsimport
* refs/heads/master:
  cycling fix: when no client is active, warp pointer to last active; from Walter Alejandro Iglesias.
  whitespace
  Fix spelling of some unused MWM hints; from Sean C. Farley.
  Add group-last command that shows only the previously active group; ok okan
  Allow bare numbers for key and mouse bindings; taken from similar support in other parse.y's; from Leon Fischer <lfischer@airmail.cc>.
  sync parse.y changes from base; ok naddy@
  Do not attempt to grab keys without a keycode; this incidentally allows XF86 keys support.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 53ca295..7d3ae6e 100644
--- a/conf.c
+++ b/conf.c
@@ -139,6 +139,7 @@ static const struct {
 
 	{ FUNC_SC(group-cycle, group_cycle, (CWM_CYCLE_FORWARD)) },
 	{ FUNC_SC(group-rcycle, group_cycle, (CWM_CYCLE_REVERSE)) },
+	{ FUNC_SC(group-last, group_last, 0) },
 	{ FUNC_SC(group-toggle-all, group_toggle_all, 0) },
 	{ FUNC_SC(group-toggle-1, group_toggle, 1) },
 	{ FUNC_SC(group-toggle-2, group_toggle, 2) },
@@ -647,7 +648,7 @@ conf_unbind_mouse(struct conf *c, struct bind_ctx *unbind)
 	struct bind_ctx		*mb = NULL, *mbnxt;
 
 	TAILQ_FOREACH_SAFE(mb, &c->mousebindq, entry, mbnxt) {
-		if ((unbind == NULL) || 
+		if ((unbind == NULL) ||
 		    ((mb->modmask == unbind->modmask) &&
 		     (mb->press.button == unbind->press.button))) {
 			TAILQ_REMOVE(&c->mousebindq, mb, entry);
@@ -669,6 +670,8 @@ conf_grab_kbd(Window win)
 
 	TAILQ_FOREACH(kb, &Conf.keybindq, entry) {
 		kc = XKeysymToKeycode(X_Dpy, kb->press.keysym);
+		if (kc == 0)
+			continue;
 		if ((XkbKeycodeToKeysym(X_Dpy, kc, 0, 0) != kb->press.keysym) &&
 		    (XkbKeycodeToKeysym(X_Dpy, kc, 0, 1) == kb->press.keysym))
 			kb->modmask |= ShiftMask;