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.
This commit is contained in:
okan 2019-08-13 18:45:38 +00:00
commit 4154b9b194
6 changed files with 13 additions and 4 deletions

8
cwm.1
View File

@ -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

View File

@ -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

View File

@ -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

1
menu.c
View File

@ -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);

1
util.c
View File

@ -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);
}

View File

@ -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 {