Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set window state to withdrawn, instead of iconic, when switching ws.
[spectrwm.git]
/
spectrwm.c
diff --git
a/spectrwm.c
b/spectrwm.c
index
5667102
..
62612f7
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-657,6
+657,9
@@
void spawn_select(struct swm_region *, union arg *, char *, int *);
void store_float_geom(struct ws_win *, struct swm_region *);
void unmanage_window(struct ws_win *);
void update_window(struct ws_win *);
void store_float_geom(struct ws_win *, struct swm_region *);
void unmanage_window(struct ws_win *);
void update_window(struct ws_win *);
+#ifdef SWM_DEBUG
+char *get_atom_name(xcb_atom_t);
+#endif
/* function definitions */
xcb_char2b_t *
/* function definitions */
xcb_char2b_t *
@@
-957,6
+960,9
@@
ewmh_update_win_state(struct ws_win *win, long state, long action)
if (win == NULL)
return;
if (win == NULL)
return;
+ DNPRINTF(SWM_D_PROP, "ewmh_update_win_state: window: 0x%x, state: %d, "
+ "action: %d\n", win->id, state, action);
+
if (state == ewmh[_NET_WM_STATE_FULLSCREEN].atom)
mask = EWMH_F_FULLSCREEN;
if (state == ewmh[_NET_WM_STATE_ABOVE].atom)
if (state == ewmh[_NET_WM_STATE_FULLSCREEN].atom)
mask = EWMH_F_FULLSCREEN;
if (state == ewmh[_NET_WM_STATE_ABOVE].atom)
@@
-2100,14
+2106,16
@@
quit(struct swm_region *r, union arg *args)
void
unmap_window(struct ws_win *win)
{
void
unmap_window(struct ws_win *win)
{
+ DNPRINTF(SWM_D_EVENT, "unmap_window: window: 0x%x\n", win->id);
+
if (win == NULL)
return;
/* don't unmap again */
if (win == NULL)
return;
/* don't unmap again */
- if (getstate(win->id) == XCB_ICCCM_WM_STATE_ICONIC)
+ if (getstate(win->id) == XCB_ICCCM_WM_STATE_WITHDRAWN)
return;
return;
- set_win_state(win, XCB_ICCCM_WM_STATE_ICONIC);
+ set_win_state(win, XCB_ICCCM_WM_STATE_WITHDRAWN);
xcb_unmap_window(conn, win->id);
xcb_change_window_attributes(conn, win->id,
xcb_unmap_window(conn, win->id);
xcb_change_window_attributes(conn, win->id,
@@
-2586,6
+2594,8
@@
switchws(struct swm_region *r, union arg *args)
event_drain(XCB_ENTER_NOTIFY);
else
xcb_flush(conn);
event_drain(XCB_ENTER_NOTIFY);
else
xcb_flush(conn);
+
+ DNPRINTF(SWM_D_WS, "switchws: done\n");
}
void
}
void
@@
-7663,6
+7673,8
@@
main(int argc, char *argv[])
if (xcb_connection_has_error(conn))
errx(1, "can not get XCB connection");
if (xcb_connection_has_error(conn))
errx(1, "can not get XCB connection");
+ XSetEventQueueOwner(display, XCBOwnsEventQueue);
+
xcb_prefetch_extension_data(conn, &xcb_randr_id);
xfd = xcb_get_file_descriptor(conn);
xcb_prefetch_extension_data(conn, &xcb_randr_id);
xfd = xcb_get_file_descriptor(conn);