From 96bca045f940d8a31bc38cabbf9646b93e9c7087 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 25 Dec 2021 14:14:17 -0800 Subject: *: test override_redirect via vwm_xwin_should_manage() Now vwm ignores override_redirect for fullscreen windows. --- src/xevent.c | 9 ++------- src/xwindow.c | 5 ++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/xevent.c b/src/xevent.c index 943ba78..8ee062c 100644 --- a/src/xevent.c +++ b/src/xevent.c @@ -152,13 +152,8 @@ void vwm_xevent_handle_map_notify(vwm_t *vwm, XMapEvent *ev) if ((xwin = vwm_xwin_lookup(vwm, ev->window))) { - /* XXX: in some circumstances (randomly mplayer -fs) it we see an event sequence for a window like: - * create_notify->map_request (manage)->configure_request->unmap_notify (unmanage)->configure_notify->map_notify (unmanaged!) - * which unless the window's an override_redirect is incorrect. - * So implicitly manage the window if it's not managed and !override_redirect, since it's now mapped. - */ - if (!xwin->managed && !xwin->attrs.override_redirect) - xwin->managed = vwm_win_manage_xwin(vwm, xwin); + if (!xwin->managed && vwm_xwin_should_manage(vwm, xwin)) + vwm_win_manage_xwin(vwm, xwin); if (xwin->managed && xwin->managed->mapping) { VWM_TRACE("swallowed vwm-induced MapNotify"); diff --git a/src/xwindow.c b/src/xwindow.c index a682e9f..813399b 100644 --- a/src/xwindow.c +++ b/src/xwindow.c @@ -188,7 +188,10 @@ 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 */ - if (!attrs.override_redirect && xwin->client_mapped) + VWM_TRACE_WIN(win, "name=\"%s\" override_redirect=%i client_mapped=%i\n", + xwin->name, (int)attrs.override_redirect, (int)xwin->client_mapped); + + if (xwin->client_mapped && vwm_xwin_should_manage(vwm, xwin)) vwm_win_manage_xwin(vwm, xwin); _out_grabbed: -- cgit v1.2.3