mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Rename internal functions to delinate between client remove, delete and xproto
delete; 'window-close' is now the proper action, but 'window-delete' as an alias will remain until more interesting changes require breaking configs.
This commit is contained in:
parent
044ef5a8cd
commit
535cf541c8
6
calmwm.h
6
calmwm.h
@ -401,7 +401,7 @@ void client_applysizehints(struct client_ctx *);
|
||||
void client_config(struct client_ctx *);
|
||||
struct client_ctx *client_current(void);
|
||||
void client_cycle(struct screen_ctx *, int);
|
||||
void client_delete(struct client_ctx *);
|
||||
void client_remove(struct client_ctx *);
|
||||
void client_draw_border(struct client_ctx *);
|
||||
struct client_ctx *client_find(Window);
|
||||
long client_get_wm_state(struct client_ctx *);
|
||||
@ -419,7 +419,7 @@ void client_ptrsave(struct client_ctx *);
|
||||
void client_ptrwarp(struct client_ctx *);
|
||||
void client_raise(struct client_ctx *);
|
||||
void client_resize(struct client_ctx *, int);
|
||||
void client_send_delete(struct client_ctx *);
|
||||
void client_close(struct client_ctx *);
|
||||
void client_set_wm_state(struct client_ctx *, long);
|
||||
void client_setactive(struct client_ctx *);
|
||||
void client_setname(struct client_ctx *);
|
||||
@ -490,7 +490,7 @@ void kbfunc_ptrmove(void *, struct cargs *);
|
||||
void kbfunc_client_snap(void *, struct cargs *);
|
||||
void kbfunc_client_move(void *, struct cargs *);
|
||||
void kbfunc_client_resize(void *, struct cargs *);
|
||||
void kbfunc_client_delete(void *, struct cargs *);
|
||||
void kbfunc_client_close(void *, struct cargs *);
|
||||
void kbfunc_client_lower(void *, struct cargs *);
|
||||
void kbfunc_client_raise(void *, struct cargs *);
|
||||
void kbfunc_client_hide(void *, struct cargs *);
|
||||
|
4
client.c
4
client.c
@ -170,7 +170,7 @@ client_find(Window win)
|
||||
}
|
||||
|
||||
void
|
||||
client_delete(struct client_ctx *cc)
|
||||
client_remove(struct client_ctx *cc)
|
||||
{
|
||||
struct screen_ctx *sc = cc->sc;
|
||||
struct winname *wn;
|
||||
@ -636,7 +636,7 @@ client_msg(struct client_ctx *cc, Atom proto, Time ts)
|
||||
}
|
||||
|
||||
void
|
||||
client_send_delete(struct client_ctx *cc)
|
||||
client_close(struct client_ctx *cc)
|
||||
{
|
||||
if (cc->flags & CLIENT_WM_DELETE_WINDOW)
|
||||
client_msg(cc, cwmh[WM_DELETE_WINDOW], CurrentTime);
|
||||
|
5
conf.c
5
conf.c
@ -67,7 +67,8 @@ static const struct {
|
||||
{ FUNC_CC(window-lower, client_lower, 0) },
|
||||
{ FUNC_CC(window-raise, client_raise, 0) },
|
||||
{ FUNC_CC(window-hide, client_hide, 0) },
|
||||
{ FUNC_CC(window-delete, client_delete, 0) },
|
||||
{ FUNC_CC(window-close, client_close, 0) },
|
||||
{ FUNC_CC(window-delete, client_close, 0) },
|
||||
{ FUNC_CC(window-htile, client_htile, 0) },
|
||||
{ FUNC_CC(window-vtile, client_vtile, 0) },
|
||||
{ FUNC_CC(window-stick, client_toggle_sticky, 0) },
|
||||
@ -194,7 +195,7 @@ static const struct {
|
||||
{ "M-Tab", "window-cycle" },
|
||||
{ "MS-Tab", "window-rcycle" },
|
||||
{ "CM-n", "window-menu-label" },
|
||||
{ "CM-x", "window-delete" },
|
||||
{ "CM-x", "window-close" },
|
||||
{ "CM-a", "group-toggle-all" },
|
||||
{ "CM-0", "group-toggle-all" },
|
||||
{ "CM-1", "group-toggle-1" },
|
||||
|
2
cwm.1
2
cwm.1
@ -100,7 +100,7 @@ Cycle through currently visible windows.
|
||||
.It Ic MS-Tab
|
||||
Reverse cycle through currently visible windows.
|
||||
.It Ic CM-x
|
||||
Delete current window.
|
||||
Close current window.
|
||||
.It Ic CM-[n]
|
||||
Toggle visibility of group n, where n is 1-9.
|
||||
.It Ic CM-a
|
||||
|
4
cwmrc.5
4
cwmrc.5
@ -306,8 +306,8 @@ Reverse cycle through windows.
|
||||
Forward cycle through windows in current group.
|
||||
.It window-rcycle-ingroup
|
||||
Reverse cycle through windows in current group.
|
||||
.It window-delete
|
||||
Delete current window.
|
||||
.It window-close
|
||||
Close current window.
|
||||
.It window-hide
|
||||
Hide current window.
|
||||
.It window-lower
|
||||
|
4
kbfunc.c
4
kbfunc.c
@ -324,9 +324,9 @@ kbfunc_client_snap(void *ctx, struct cargs *cargs)
|
||||
}
|
||||
|
||||
void
|
||||
kbfunc_client_delete(void *ctx, struct cargs *cargs)
|
||||
kbfunc_client_close(void *ctx, struct cargs *cargs)
|
||||
{
|
||||
client_send_delete(ctx);
|
||||
client_close(ctx);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -102,7 +102,7 @@ xev_handle_unmapnotify(XEvent *ee)
|
||||
client_set_wm_state(cc, WithdrawnState);
|
||||
} else {
|
||||
if (!(cc->flags & CLIENT_HIDDEN))
|
||||
client_delete(cc);
|
||||
client_remove(cc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -116,7 +116,7 @@ xev_handle_destroynotify(XEvent *ee)
|
||||
LOG_DEBUG3("window: 0x%lx", e->window);
|
||||
|
||||
if ((cc = client_find(e->window)) != NULL)
|
||||
client_delete(cc);
|
||||
client_remove(cc);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -389,7 +389,7 @@ xev_handle_clientmessage(XEvent *ee)
|
||||
}
|
||||
} else if (e->message_type == ewmh[_NET_CLOSE_WINDOW]) {
|
||||
if ((cc = client_find(e->window)) != NULL) {
|
||||
client_send_delete(cc);
|
||||
client_close(cc);
|
||||
}
|
||||
} else if (e->message_type == ewmh[_NET_ACTIVE_WINDOW]) {
|
||||
if ((cc = client_find(e->window)) != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user