From ab6d8dca0b8fa2691bca0f1fca4b5a9ea541fa9d Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Wed, 15 Jan 2020 22:03:14 +0100 Subject: [PATCH] compositor: Don't draw shadow on maximized windows This can lead to misleading situations, e.g. if you have >1 display and the edge of the next display is blurry/dark for no obvious reason. --- src/compositor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 1ba6b0d88..087dc0e08 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -91,6 +91,7 @@ (cw->attr.height + 2 * cw->attr.border_width >= cw->screen_info->height)) #define WIN_IS_SHAPED(cw) ((WIN_HAS_CLIENT(cw) && FLAG_TEST (cw->c->flags, CLIENT_FLAG_HAS_SHAPE)) || \ (WIN_IS_OVERRIDE(cw) && (cw->shaped))) +#define WIN_IS_MAXIMIZED(cw) (WIN_HAS_CLIENT(cw) && FLAG_TEST_ALL (cw->c->flags, CLIENT_FLAG_MAXIMIZED)) #define WIN_IS_VIEWABLE(cw) (cw->viewable) #define WIN_HAS_DAMAGE(cw) (cw->damage) #define WIN_IS_VISIBLE(cw) (WIN_IS_VIEWABLE(cw) && WIN_HAS_DAMAGE(cw)) @@ -1768,6 +1769,7 @@ win_extents (CWindow *cw) !WIN_IS_OVERRIDE(cw) && !WIN_NO_SHADOW(cw) && !WIN_IS_DOCK(cw) && + !WIN_IS_MAXIMIZED(cw) && (WIN_HAS_FRAME(cw) || !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw)))) || (screen_info->params->show_dock_shadow && WIN_IS_DOCK(cw) && -- 2.20.1