mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
merge kbd and mouse grouptoggle
This commit is contained in:
parent
31d4fe9f33
commit
b1c2046efd
2
calmwm.h
2
calmwm.h
@ -495,8 +495,6 @@ void kbfunc_ssh(struct client_ctx *, union arg *);
|
|||||||
void kbfunc_term(struct client_ctx *, union arg *);
|
void kbfunc_term(struct client_ctx *, union arg *);
|
||||||
void kbfunc_tile(struct client_ctx *, union arg *);
|
void kbfunc_tile(struct client_ctx *, union arg *);
|
||||||
|
|
||||||
void mousefunc_client_grouptoggle(struct client_ctx *,
|
|
||||||
union arg *);
|
|
||||||
void mousefunc_client_move(struct client_ctx *,
|
void mousefunc_client_move(struct client_ctx *,
|
||||||
union arg *);
|
union arg *);
|
||||||
void mousefunc_client_resize(struct client_ctx *,
|
void mousefunc_client_resize(struct client_ctx *,
|
||||||
|
4
conf.c
4
conf.c
@ -391,7 +391,7 @@ static const struct {
|
|||||||
{.i = CWM_CYCLE|CWM_INGROUP} },
|
{.i = CWM_CYCLE|CWM_INGROUP} },
|
||||||
{ "rcycleingroup", kbfunc_client_cycle, CWM_WIN,
|
{ "rcycleingroup", kbfunc_client_cycle, CWM_WIN,
|
||||||
{.i = CWM_RCYCLE|CWM_INGROUP} },
|
{.i = CWM_RCYCLE|CWM_INGROUP} },
|
||||||
{ "grouptoggle", kbfunc_client_grouptoggle, CWM_WIN, {0}},
|
{ "grouptoggle", kbfunc_client_grouptoggle, CWM_WIN, {.i = 0}},
|
||||||
{ "sticky", kbfunc_client_toggle_sticky, CWM_WIN, {0} },
|
{ "sticky", kbfunc_client_toggle_sticky, CWM_WIN, {0} },
|
||||||
{ "fullscreen", kbfunc_client_toggle_fullscreen, CWM_WIN, {0} },
|
{ "fullscreen", kbfunc_client_toggle_fullscreen, CWM_WIN, {0} },
|
||||||
{ "maximize", kbfunc_client_toggle_maximize, CWM_WIN, {0} },
|
{ "maximize", kbfunc_client_toggle_maximize, CWM_WIN, {0} },
|
||||||
@ -460,7 +460,7 @@ static const struct {
|
|||||||
{ "window_hide", kbfunc_client_hide, CWM_WIN, {0} },
|
{ "window_hide", kbfunc_client_hide, CWM_WIN, {0} },
|
||||||
{ "window_move", mousefunc_client_move, CWM_WIN, {0} },
|
{ "window_move", mousefunc_client_move, CWM_WIN, {0} },
|
||||||
{ "window_resize", mousefunc_client_resize, CWM_WIN, {0} },
|
{ "window_resize", mousefunc_client_resize, CWM_WIN, {0} },
|
||||||
{ "window_grouptoggle", mousefunc_client_grouptoggle, CWM_WIN, {0} },
|
{ "window_grouptoggle", kbfunc_client_grouptoggle, CWM_WIN, {.i = 1} },
|
||||||
{ "menu_group", mousefunc_menu_group, 0, {0} },
|
{ "menu_group", mousefunc_menu_group, 0, {0} },
|
||||||
{ "menu_unhide", mousefunc_menu_unhide, 0, {0} },
|
{ "menu_unhide", mousefunc_menu_unhide, 0, {0} },
|
||||||
{ "menu_cmd", mousefunc_menu_cmd, 0, {0} },
|
{ "menu_cmd", mousefunc_menu_cmd, 0, {0} },
|
||||||
|
2
kbfunc.c
2
kbfunc.c
@ -435,9 +435,11 @@ kbfunc_client_nogroup(struct client_ctx *cc, union arg *arg)
|
|||||||
void
|
void
|
||||||
kbfunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
|
kbfunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
|
||||||
{
|
{
|
||||||
|
if (arg->i == 0) {
|
||||||
/* XXX for stupid X apps like xpdf and gvim */
|
/* XXX for stupid X apps like xpdf and gvim */
|
||||||
XGrabKeyboard(X_Dpy, cc->win, True,
|
XGrabKeyboard(X_Dpy, cc->win, True,
|
||||||
GrabModeAsync, GrabModeAsync, CurrentTime);
|
GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
|
}
|
||||||
|
|
||||||
group_toggle_membership_enter(cc);
|
group_toggle_membership_enter(cc);
|
||||||
}
|
}
|
||||||
|
@ -172,12 +172,6 @@ mousefunc_client_move(struct client_ctx *cc, union arg *arg)
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
mousefunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
|
|
||||||
{
|
|
||||||
group_toggle_membership_enter(cc);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
mousefunc_menu_group(struct client_ctx *cc, union arg *arg)
|
mousefunc_menu_group(struct client_ctx *cc, union arg *arg)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user