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.
This commit is contained in:
21
kbfunc.c
21
kbfunc.c
@@ -453,7 +453,16 @@ kbfunc_client_cycle(void *ctx, struct cargs *cargs)
|
||||
newcc->ptr.x = newcc->geom.w / 2;
|
||||
newcc->ptr.y = newcc->geom.h / 2;
|
||||
}
|
||||
client_ptr_warp(newcc);
|
||||
|
||||
/* When no client is active, warp pointer to last active. */
|
||||
if (oldcc->flags & (CLIENT_ACTIVE))
|
||||
client_ptr_warp(newcc);
|
||||
else if (oldcc->flags & (CLIENT_SKIP_CYCLE))
|
||||
client_ptr_warp(newcc);
|
||||
else {
|
||||
client_raise(oldcc);
|
||||
client_ptr_warp(oldcc);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -481,6 +490,14 @@ kbfunc_group_only(void *ctx, struct cargs *cargs)
|
||||
group_only(ctx, cargs->flag);
|
||||
}
|
||||
|
||||
void
|
||||
kbfunc_group_last(void *ctx, struct cargs *cargs)
|
||||
{
|
||||
struct screen_ctx *sc = ctx;
|
||||
|
||||
group_only(ctx, sc->group_last->num);
|
||||
}
|
||||
|
||||
void
|
||||
kbfunc_group_toggle(void *ctx, struct cargs *cargs)
|
||||
{
|
||||
@@ -663,7 +680,7 @@ kbfunc_menu_exec(void *ctx, struct cargs *cargs)
|
||||
/* lstat(2) in case d_type isn't supported. */
|
||||
if (lstat(tpath, &sb) == -1)
|
||||
continue;
|
||||
if (!S_ISREG(sb.st_mode) &&
|
||||
if (!S_ISREG(sb.st_mode) &&
|
||||
!S_ISLNK(sb.st_mode))
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user