mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Implement _NET_CLIENT_LIST_STACKING (from Thomas Admin), but
bottom-to-top order, as per spec (notified Thomas as well).
This commit is contained in:
parent
97db17d056
commit
dcfbc9e809
2
calmwm.h
2
calmwm.h
@ -352,6 +352,7 @@ enum {
|
|||||||
_NET_SUPPORTING_WM_CHECK,
|
_NET_SUPPORTING_WM_CHECK,
|
||||||
_NET_ACTIVE_WINDOW,
|
_NET_ACTIVE_WINDOW,
|
||||||
_NET_CLIENT_LIST,
|
_NET_CLIENT_LIST,
|
||||||
|
_NET_CLIENT_LIST_STACKING,
|
||||||
_NET_NUMBER_OF_DESKTOPS,
|
_NET_NUMBER_OF_DESKTOPS,
|
||||||
_NET_CURRENT_DESKTOP,
|
_NET_CURRENT_DESKTOP,
|
||||||
_NET_DESKTOP_VIEWPORT,
|
_NET_DESKTOP_VIEWPORT,
|
||||||
@ -562,6 +563,7 @@ void xu_ewmh_net_supported_wm_check(struct screen_ctx *);
|
|||||||
void xu_ewmh_net_desktop_geometry(struct screen_ctx *);
|
void xu_ewmh_net_desktop_geometry(struct screen_ctx *);
|
||||||
void xu_ewmh_net_workarea(struct screen_ctx *);
|
void xu_ewmh_net_workarea(struct screen_ctx *);
|
||||||
void xu_ewmh_net_client_list(struct screen_ctx *);
|
void xu_ewmh_net_client_list(struct screen_ctx *);
|
||||||
|
void xu_ewmh_net_client_list_stacking(struct screen_ctx *);
|
||||||
void xu_ewmh_net_active_window(struct screen_ctx *, Window);
|
void xu_ewmh_net_active_window(struct screen_ctx *, Window);
|
||||||
void xu_ewmh_net_wm_desktop_viewport(struct screen_ctx *);
|
void xu_ewmh_net_wm_desktop_viewport(struct screen_ctx *);
|
||||||
void xu_ewmh_net_wm_number_of_desktops(struct screen_ctx *);
|
void xu_ewmh_net_wm_number_of_desktops(struct screen_ctx *);
|
||||||
|
2
client.c
2
client.c
@ -112,6 +112,7 @@ client_init(Window win, struct screen_ctx *sc)
|
|||||||
TAILQ_INSERT_TAIL(&sc->clientq, cc, entry);
|
TAILQ_INSERT_TAIL(&sc->clientq, cc, entry);
|
||||||
|
|
||||||
xu_ewmh_net_client_list(sc);
|
xu_ewmh_net_client_list(sc);
|
||||||
|
xu_ewmh_net_client_list_stacking(sc);
|
||||||
xu_ewmh_restore_net_wm_state(cc);
|
xu_ewmh_restore_net_wm_state(cc);
|
||||||
|
|
||||||
if (client_get_wm_state(cc) == IconicState)
|
if (client_get_wm_state(cc) == IconicState)
|
||||||
@ -152,6 +153,7 @@ client_delete(struct client_ctx *cc)
|
|||||||
TAILQ_REMOVE(&sc->clientq, cc, entry);
|
TAILQ_REMOVE(&sc->clientq, cc, entry);
|
||||||
|
|
||||||
xu_ewmh_net_client_list(sc);
|
xu_ewmh_net_client_list(sc);
|
||||||
|
xu_ewmh_net_client_list_stacking(sc);
|
||||||
|
|
||||||
if (cc->group != NULL)
|
if (cc->group != NULL)
|
||||||
TAILQ_REMOVE(&cc->group->clientq, cc, group_entry);
|
TAILQ_REMOVE(&cc->group->clientq, cc, group_entry);
|
||||||
|
1
conf.c
1
conf.c
@ -668,6 +668,7 @@ static char *ewmhints[] = {
|
|||||||
"_NET_SUPPORTING_WM_CHECK",
|
"_NET_SUPPORTING_WM_CHECK",
|
||||||
"_NET_ACTIVE_WINDOW",
|
"_NET_ACTIVE_WINDOW",
|
||||||
"_NET_CLIENT_LIST",
|
"_NET_CLIENT_LIST",
|
||||||
|
"_NET_CLIENT_LIST_STACKING",
|
||||||
"_NET_NUMBER_OF_DESKTOPS",
|
"_NET_NUMBER_OF_DESKTOPS",
|
||||||
"_NET_CURRENT_DESKTOP",
|
"_NET_CURRENT_DESKTOP",
|
||||||
"_NET_DESKTOP_VIEWPORT",
|
"_NET_DESKTOP_VIEWPORT",
|
||||||
|
21
xutil.c
21
xutil.c
@ -228,6 +228,27 @@ xu_ewmh_net_client_list(struct screen_ctx *sc)
|
|||||||
free(winlist);
|
free(winlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xu_ewmh_net_client_list_stacking(struct screen_ctx *sc)
|
||||||
|
{
|
||||||
|
struct client_ctx *cc;
|
||||||
|
Window *winlist;
|
||||||
|
int i = 0, j;
|
||||||
|
|
||||||
|
TAILQ_FOREACH(cc, &sc->clientq, entry)
|
||||||
|
i++;
|
||||||
|
if (i == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
j = i;
|
||||||
|
winlist = xreallocarray(NULL, i, sizeof(*winlist));
|
||||||
|
TAILQ_FOREACH(cc, &sc->clientq, entry)
|
||||||
|
winlist[--j] = cc->win;
|
||||||
|
XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_CLIENT_LIST_STACKING],
|
||||||
|
XA_WINDOW, 32, PropModeReplace, (unsigned char *)winlist, i);
|
||||||
|
free(winlist);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xu_ewmh_net_active_window(struct screen_ctx *sc, Window w)
|
xu_ewmh_net_active_window(struct screen_ctx *sc, Window w)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user