Feature: Unredirect windows when there's a fullscreen window
- Optionally unredirect windows when there's a fullscreen opaque window on the top of the stack (--unredir-if-possible). Experimental. Known issues: * Screen flickers when redirecting/unredirecting windows. --paint-on-overlay seemingly minimizes it (Thanks for hints from mutter), but still noticeable. * It probably does not play well with vdpau in some cases. - A debug option DEBUG_REDIR is added. - Fix a bug that reg_ignore are not expired when a CirculateNotify is received. - Add extra safe guards in some places, which could be bad for performance. - Remove some abundant code.
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
// #define DEBUG_CLIENTWIN 1
|
||||
// #define DEBUG_WINDATA 1
|
||||
// #define DEBUG_WINMATCH 1
|
||||
// #define DEBUG_REDIR 1
|
||||
// #define MONITOR_REPAINT 1
|
||||
|
||||
// Whether to enable PCRE regular expression support in blacklists, enabled
|
||||
@ -367,6 +368,9 @@ typedef struct _options {
|
||||
/// Whether to paint on X Composite overlay window instead of root
|
||||
/// window.
|
||||
Bool paint_on_overlay;
|
||||
/// Whether to unredirect all windows if a full-screen opaque window
|
||||
/// is detected.
|
||||
Bool unredir_if_possible;
|
||||
/// Whether to work under synchronized mode for debugging.
|
||||
Bool synchronize;
|
||||
|
||||
@ -960,12 +964,26 @@ update_reg_ignore_expire(const win *w) {
|
||||
reg_ignore_expire = True;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a window has WM frames.
|
||||
*/
|
||||
static inline bool
|
||||
win_has_frame(const win *w) {
|
||||
return w->top_width || w->left_width || w->right_width
|
||||
|| w->bottom_width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a window is a fullscreen window.
|
||||
*
|
||||
* It's not using w->border_size for performance measures.
|
||||
*/
|
||||
static inline bool
|
||||
win_is_fullscreen(const win *w) {
|
||||
return (w->a.x <= 0 && w->a.y <= 0 && (w->a.x + w->widthb) >= root_width
|
||||
&& (w->a.y + w->heightb) >= root_height && !w->bounding_shaped);
|
||||
}
|
||||
|
||||
static void
|
||||
win_rounded_corners(Display *dpy, win *w);
|
||||
|
||||
@ -1345,3 +1363,9 @@ init_dbe(void);
|
||||
|
||||
static void
|
||||
init_overlay(void);
|
||||
|
||||
static void
|
||||
redir_start(Display *dpy);
|
||||
|
||||
static void
|
||||
redir_stop(Display *dpy);
|
||||
|
Reference in New Issue
Block a user