mirror of
https://github.com/vale981/spectrwm
synced 2025-03-05 09:51:38 -05:00
Fix dumpwins().
This commit is contained in:
parent
cff561c10b
commit
8ed4457ecc
1 changed files with 10 additions and 10 deletions
20
spectrwm.c
20
spectrwm.c
|
@ -1142,7 +1142,7 @@ dumpwins(struct swm_region *r, union arg *args)
|
||||||
struct ws_win *win;
|
struct ws_win *win;
|
||||||
uint16_t state;
|
uint16_t state;
|
||||||
xcb_get_window_attributes_cookie_t c;
|
xcb_get_window_attributes_cookie_t c;
|
||||||
xcb_get_window_attributes_reply_t *r;
|
xcb_get_window_attributes_reply_t *wa;
|
||||||
|
|
||||||
if (r->ws == NULL) {
|
if (r->ws == NULL) {
|
||||||
warnx("dumpwins: invalid workspace");
|
warnx("dumpwins: invalid workspace");
|
||||||
|
@ -1153,12 +1153,12 @@ dumpwins(struct swm_region *r, union arg *args)
|
||||||
TAILQ_FOREACH(win, &r->ws->winlist, entry) {
|
TAILQ_FOREACH(win, &r->ws->winlist, entry) {
|
||||||
state = getstate(win->id);
|
state = getstate(win->id);
|
||||||
c = xcb_get_window_attributes(conn, win->id);
|
c = xcb_get_window_attributes(conn, win->id);
|
||||||
r = xcb_get_window_attributes_reply(conn, c, NULL);
|
wa = xcb_get_window_attributes_reply(conn, c, NULL);
|
||||||
if (r) {
|
if (wa) {
|
||||||
warnx("window: 0x%x, map_state: %d, state: %u, "
|
warnx("window: 0x%x, map_state: %d, state: %u, "
|
||||||
"transient: 0x%x", win->id, wa.map_state,
|
"transient: 0x%x", win->id, wa->map_state,
|
||||||
state, win->transient);
|
state, win->transient);
|
||||||
free(r);
|
free(wa);
|
||||||
} else
|
} else
|
||||||
warnx("window: 0x%x, failed xcb_get_window_attributes",
|
warnx("window: 0x%x, failed xcb_get_window_attributes",
|
||||||
win->id);
|
win->id);
|
||||||
|
@ -1168,14 +1168,14 @@ dumpwins(struct swm_region *r, union arg *args)
|
||||||
TAILQ_FOREACH(win, &r->ws->unmanagedlist, entry) {
|
TAILQ_FOREACH(win, &r->ws->unmanagedlist, entry) {
|
||||||
state = getstate(win->id);
|
state = getstate(win->id);
|
||||||
c = xcb_get_window_attributes(conn, win->id);
|
c = xcb_get_window_attributes(conn, win->id);
|
||||||
r xcb_get_window_attributes_reply(conn, c, NULL);
|
wa = xcb_get_window_attributes_reply(conn, c, NULL);
|
||||||
if (r) {
|
if (wa) {
|
||||||
warnx("window: 0x%lx, map_state: %d, state: %u, "
|
warnx("window: 0x%lx, map_state: %d, state: %u, "
|
||||||
"transient: 0x%lx", win->id, wa.map_state,
|
"transient: 0x%lx", win->id, wa->map_state,
|
||||||
state, win->transient);
|
state, win->transient);
|
||||||
free(r);
|
free(wa);
|
||||||
} else
|
} else
|
||||||
warnx("window: 0x%lx, failed XGetWindowAttributes",
|
warnx("window: 0x%x, failed xcb_get_window_attributes",
|
||||||
win->id);
|
win->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue