diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-23 22:00:46 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-24 01:59:44 -0700 |
commit | 6abaa282e45d63909c5a3fce5ee514c8c8f5514b (patch) | |
tree | 589ba5436cc9999f30eccb84f17dc83258ed988f /src | |
parent | 3f168827c40352c07bf91e8a1d15fc6b49b094cf (diff) |
xwindow: drop configurable HONOR_OVERRIDE_REDIRECT
It's far too obnoxious to use without this enabled.
Some spurious cleanups in the surrounding code landed here as well.
Diffstat (limited to 'src')
-rw-r--r-- | src/xwindow.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/xwindow.c b/src/xwindow.c index 4b52b3b..552d9aa 100644 --- a/src/xwindow.c +++ b/src/xwindow.c @@ -28,7 +28,6 @@ #include "window.h" #include "xwindow.h" -#define HONOR_OVERRIDE_REDIRECT /* send a client message to a window (currently used for WM_DELETE) */ void vwm_xwin_message(vwm_t *vwm, vwm_xwindow_t *xwin, Atom type, long foo) @@ -131,8 +130,8 @@ void vwm_xwin_setup_overlay(vwm_t *vwm, vwm_xwindow_t *xwin) /* if the window is already mapped and not an override_redirect window, it becomes managed here. */ vwm_xwindow_t * vwm_xwin_create(vwm_t *vwm, Window win, vwm_grab_mode_t grabbed) { - XWindowAttributes attrs; vwm_xwindow_t *xwin = NULL; + XWindowAttributes attrs; VWM_TRACE("creating %#x", (unsigned int)win); @@ -165,7 +164,8 @@ vwm_xwindow_t * vwm_xwin_create(vwm_t *vwm, Window win, vwm_grab_mode_t grabbed) /* we must track the mapped-by-client state of the window independent of managed vs. unmanaged because * in the case of override_redirect windows they may be unmapped (invisible) or mapped (visible) like menus without being managed. - * otherwise we could just use !xwin.managed to indicate unmapped, which is more vwm2-like, but insufficient when compositing. */ + * otherwise we could just use !xwin.managed to indicate unmapped, which is more vwm2-like, but insufficient when compositing. + */ xwin->mapped = (attrs.map_state != IsUnmapped); vwm_xwin_setup_overlay(vwm, xwin); @@ -173,13 +173,9 @@ vwm_xwindow_t * vwm_xwin_create(vwm_t *vwm, Window win, vwm_grab_mode_t grabbed) list_add_tail(&xwin->xwindows, &vwm->xwindows); /* created windows are always placed on the top of the stacking order */ -#ifdef HONOR_OVERRIDE_REDIRECT if (!attrs.override_redirect && xwin->mapped) vwm_win_manage_xwin(vwm, xwin); -#else - if (xwin->mapped) - vwm_win_manage_xwin(vwm, xwin); -#endif + _out_grabbed: if (!grabbed) XUngrabServer(VWM_XDISPLAY(vwm)); @@ -222,9 +218,8 @@ void vwm_xwin_restack(vwm_t *vwm, vwm_xwindow_t *xwin, Window new_above) vwm_xwindow_t *tmp; fprintf(stderr, "restack of %#x new_above=%#x\n", (unsigned int)xwin->id, (unsigned int)new_above); fprintf(stderr, "restack pre:"); - list_for_each_entry(tmp, &vwm->xwindows, xwindows) { + list_for_each_entry(tmp, &vwm->xwindows, xwindows) fprintf(stderr, " %#x", (unsigned int)tmp->id); - } fprintf(stderr, "\n"); #endif if (xwin->xwindows.prev != &vwm->xwindows) { @@ -244,13 +239,13 @@ void vwm_xwin_restack(vwm_t *vwm, vwm_xwindow_t *xwin, Window new_above) } #ifdef TRACE fprintf(stderr, "restack post:"); - list_for_each_entry(tmp, &vwm->xwindows, xwindows) { + list_for_each_entry(tmp, &vwm->xwindows, xwindows) fprintf(stderr, " %#x", (unsigned int)tmp->id); - } fprintf(stderr, "\n\n"); #endif } + /* create xwindows for all existing windows (for startup) */ int vwm_xwin_create_existing(vwm_t *vwm) { |