From 3f1caab46a090ee48879bd5de43774dd285f2cbb Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 29 Apr 2019 19:02:21 +0000 Subject: Handle _NET_WM_NAME changes. This fixes the problem where cwm's window menu wouldn't show Firefox's current window title if it contains non-ASCII characters. OK okan@ --- xevents.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xevents.c b/xevents.c index 4dfef72..696ff32 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 { -- cgit 1.4.1 From 25b699b582aff7587fe2c5ca61434c8d3e4a2c0c Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 29 Apr 2019 19:03:20 +0000 Subject: Plug a memory leak in log_debug(); OK okan@ --- util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util.c b/util.c index 09135a4..f0e1d87 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); } -- cgit 1.4.1 From 40000724cce67a6346c8af3972da020d4249d8fe Mon Sep 17 00:00:00 2001 From: kn Date: Tue, 2 Jul 2019 23:37:47 +0000 Subject: command uses execvp(3) not execve(2) util.c:u_exec() has been doing so since import. --- cwmrc.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit 1.4.1 From fdb841c3b0393f960afaab6bcc9dcc1c0d569018 Mon Sep 17 00:00:00 2001 From: kn Date: Tue, 9 Jul 2019 21:38:44 +0000 Subject: Add application section Link what is described as "applications" here to how they are actually defined in cwmrc(5). While here, call the configuration file what it is instead of reusing the default path (already mentioned in the FILES section). OK okan --- cwm.1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 -- cgit 1.4.1 From 6131e36f8a838aa54ed687dc08b387bceeb70fdf Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 12 Aug 2019 00:52:36 +0000 Subject: 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. --- menu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/menu.c b/menu.c index d0d3802..60633fc 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); -- cgit 1.4.1 From 781af9c998b109ffc21569afcca8e0f850c4ddbf Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 13 Aug 2019 18:45:38 +0000 Subject: 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. ok kn@ --- kbfunc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kbfunc.c b/kbfunc.c index 03a5d79..b171231 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -142,6 +142,7 @@ kbfunc_client_move_kb(void *ctx, struct cargs *cargs) client_move(cc); client_ptr_inbound(cc, 1); + XSync(X_Dpy, True); } static void @@ -230,6 +231,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 -- cgit 1.4.1