about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2019-08-13 18:45:38 +0000
committerokan <okan>2019-08-13 18:45:38 +0000
commit4154b9b194845814dfc836d80a94f34bcbf25d3e (patch)
treeb215bbc7f8f3de39bab572893bdd2063dec4ebcd
parent85d88f33042f7c397b75513e1561b361815caad7 (diff)
parent781af9c998b109ffc21569afcca8e0f850c4ddbf (diff)
downloadcwm-4154b9b194845814dfc836d80a94f34bcbf25d3e.tar.gz
cwm-4154b9b194845814dfc836d80a94f34bcbf25d3e.tar.xz
cwm-4154b9b194845814dfc836d80a94f34bcbf25d3e.zip
cvsimport
* refs/heads/master:
  Because cwm warps the pointer during a client move (to stay within the client), there's a window of time where an expose or enternotify event will get generated for a lower client; use a hammer and drain events after keyboard move/resize, until such a time that cwm doesn't warp the pointer.  Behavior noticed by kn.
  Fix regression from r1.107 (lost a return); kettenis@ pointed out the high potential for a use-after-free (true!) where kn@ ran into the regression using an app that actually exercised the XGrabPointer() failure path.
  Add application section
  command uses execvp(3) not execve(2)
  Plug a memory leak in log_debug(); OK okan@
  Handle _NET_WM_NAME changes.
-rw-r--r--cwm.18
-rw-r--r--cwmrc.52
-rw-r--r--kbfunc.c2
-rw-r--r--menu.c1
-rw-r--r--util.c1
-rw-r--r--xevents.c3
6 files changed, 13 insertions, 4 deletions
diff --git a/cwm.1 b/cwm.1
index 7a3f49f..e0a892e 100644
--- a/cwm.1
+++ b/cwm.1
@@ -219,6 +219,11 @@ Window is currently focused.
 .It &
 Window is hidden.
 .El
+.Sh APPLICATIONS
+.Nm
+manages a list of applications defined with the
+.Cm command
+configuration option.
 .Sh GROUPS
 .Nm
 has the ability to group windows together, and use the groups to
@@ -242,8 +247,7 @@ Selecting an item will warp to that window, unhiding it if necessary.
 Show list of currently defined groups.
 Selecting an item will hide/unhide that group.
 .It Ic M3
-Show list of applications as defined in
-.Pa ~/.cwmrc .
+Show list of applications as defined in the configuration file.
 Selecting an item will spawn that application.
 .El
 .Sh ENVIRONMENT
diff --git a/cwmrc.5 b/cwmrc.5
index 7434d66..41093a5 100644
--- a/cwmrc.5
+++ b/cwmrc.5
@@ -173,7 +173,7 @@ entry is shown in the application menu.
 When selected, the defined
 .Ar path
 is executed with
-.Xr execve 2 .
+.Xr execvp 3 .
 .Pp
 The
 .Ar name
diff --git a/kbfunc.c b/kbfunc.c
index bb5ac37..cd4ef1c 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -145,6 +145,7 @@ kbfunc_client_move_kb(void *ctx, struct cargs *cargs)
 
 	client_move(cc);
 	client_ptr_inbound(cc, 1);
+	XSync(X_Dpy, True);
 }
 
 static void
@@ -233,6 +234,7 @@ kbfunc_client_resize_kb(void *ctx, struct cargs *cargs)
 
 	client_resize(cc, 1);
 	client_ptr_inbound(cc, 1);
+	XSync(X_Dpy, True);
 }
 
 static void
diff --git a/menu.c b/menu.c
index 2d6ba27..c9b4b0e 100644
--- a/menu.c
+++ b/menu.c
@@ -129,6 +129,7 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, const char *prompt,
 	    CurrentTime) != GrabSuccess) {
 		XftDrawDestroy(mc.xftdraw);
 		XDestroyWindow(X_Dpy, mc.win);
+		return(NULL);
 	}
 
 	XGetInputFocus(X_Dpy, &focuswin, &focusrevert);
diff --git a/util.c b/util.c
index 0fa8e9d..781308f 100644
--- a/util.c
+++ b/util.c
@@ -135,5 +135,6 @@ log_debug(int level, const char *func, const char *msg, ...)
 	va_start(ap, msg);
 	xasprintf(&fmt, "debug%d: %s: %s", level, func, msg);
 	log_msg(fmt, ap);
+	free(fmt);
 	va_end(ap);
 }
diff --git a/xevents.c b/xevents.c
index c8d85d4..dd4bcb3 100644
--- a/xevents.c
+++ b/xevents.c
@@ -207,7 +207,8 @@ xev_handle_propertynotify(XEvent *ee)
 				group_movetogroup(cc, cc->gc->num);
 			break;
 		default:
-			/* do nothing */
+			if (e->atom == ewmh[_NET_WM_NAME])
+				client_setname(cc);
 			break;
 		}
 	} else {