From f12e78b56fb26ea97b4e969a3ccb12c9e3f21a73 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 25 Dec 2021 14:09:38 -0800 Subject: xwindow: introduce vwm_xwin_should_manage() Preparatory commit for applying a heuristic to honoring override_redirect. The X11 specification more or less requires honoring this window flag, but it's really a disaster to blindly do so. This function will be used to evaluate override_redirect wherever it's currently being directly used to determine wether a window should be managed or not. As-implemented it only ignores override_redirect when the window dimensions match its screen dimensions (fullscreen windows). In the future this might get loosened up a bit to encompass windows covering more than something unexpectedly large for a tooltip/popup, like 50% of the screen, since valid override_redirect uses should arguably be limited to small windows. --- src/xwindow.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/xwindow.h') diff --git a/src/xwindow.h b/src/xwindow.h index 1318421..65d0725 100644 --- a/src/xwindow.h +++ b/src/xwindow.h @@ -41,6 +41,7 @@ void vwm_xwin_message(vwm_t *vwm, vwm_xwindow_t *xwin, Atom type, long foo); vwm_xwindow_t * vwm_xwin_lookup(vwm_t *vwm, Window win); int vwm_xwin_is_mapped(vwm_t *vwm, vwm_xwindow_t *xwin); void vwm_xwin_monitor(vwm_t *vwm, vwm_xwindow_t *xwin); +int vwm_xwin_should_manage(vwm_t *vwm, vwm_xwindow_t *xwin); vwm_xwindow_t * vwm_xwin_create(vwm_t *vwm, Window win, vwm_grab_mode_t grabbed); void vwm_xwin_destroy(vwm_t *vwm, vwm_xwindow_t *xwin); void vwm_xwin_restack(vwm_t *vwm, vwm_xwindow_t *xwin, Window new_above); -- cgit v1.2.3