mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Merge group_toggle_membership_leave into the buttonrelease event and only do
border work for a group/ungroup action.
This commit is contained in:
parent
5ddaed415c
commit
ba75c13953
3
calmwm.h
3
calmwm.h
@ -442,8 +442,7 @@ void group_movetogroup(struct client_ctx *, int);
|
||||
void group_only(struct screen_ctx *, int);
|
||||
int group_restore(struct client_ctx *);
|
||||
void group_show(struct group_ctx *);
|
||||
void group_toggle_membership_enter(struct client_ctx *);
|
||||
void group_toggle_membership_leave(struct client_ctx *);
|
||||
void group_toggle_membership(struct client_ctx *);
|
||||
void group_update_names(struct screen_ctx *);
|
||||
|
||||
void search_match_client(struct menu_q *, struct menu_q *,
|
||||
|
9
group.c
9
group.c
@ -170,7 +170,7 @@ group_movetogroup(struct client_ctx *cc, int idx)
|
||||
}
|
||||
|
||||
void
|
||||
group_toggle_membership_enter(struct client_ctx *cc)
|
||||
group_toggle_membership(struct client_ctx *cc)
|
||||
{
|
||||
struct screen_ctx *sc = cc->sc;
|
||||
struct group_ctx *gc = sc->group_active;
|
||||
@ -186,13 +186,6 @@ group_toggle_membership_enter(struct client_ctx *cc)
|
||||
client_draw_border(cc);
|
||||
}
|
||||
|
||||
void
|
||||
group_toggle_membership_leave(struct client_ctx *cc)
|
||||
{
|
||||
cc->flags &= ~CLIENT_HIGHLIGHT;
|
||||
client_draw_border(cc);
|
||||
}
|
||||
|
||||
int
|
||||
group_holds_only_sticky(struct group_ctx *gc)
|
||||
{
|
||||
|
2
kbfunc.c
2
kbfunc.c
@ -411,7 +411,7 @@ kbfunc_client_toggle_group(void *ctx, struct cargs *cargs)
|
||||
XGrabKeyboard(X_Dpy, cc->win, True,
|
||||
GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
|
||||
group_toggle_membership_enter(cc);
|
||||
group_toggle_membership(cc);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -260,8 +260,10 @@ xev_handle_buttonrelease(XEvent *ee)
|
||||
struct client_ctx *cc;
|
||||
|
||||
if ((cc = client_find(e->window)) != NULL) {
|
||||
if (cc->flags & CLIENT_ACTIVE)
|
||||
group_toggle_membership_leave(cc);
|
||||
if (cc->flags & (CLIENT_ACTIVE | CLIENT_HIGHLIGHT)) {
|
||||
cc->flags &= ~CLIENT_HIGHLIGHT;
|
||||
client_draw_border(cc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user