summaryrefslogtreecommitdiff
path: root/src/compositor
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2021-01-30 11:21:39 +0000
committerraveit65 <[email protected]>2021-06-04 17:30:50 +0200
commit4f567598327e9fdc50eec37ef286c62415a6677f (patch)
treeba5d95fb5ab620461969712deebde6d5a0faa98e /src/compositor
parent60e6fbfb093d63c46ca8e77750c54f31c9780c1c (diff)
downloadmarco-4f567598327e9fdc50eec37ef286c62415a6677f.tar.bz2
marco-4f567598327e9fdc50eec37ef286c62415a6677f.tar.xz
window: Do not render shadows on left/right tiled windows
This pull request prevents shadows being rendered for left and right side titled windows. This behaviour is consistent with maximised windows, which also do not render shadows. The rationale for this change is so that when two windows are titled along side each other, it prevents central shadows bleeding into the touching points of the windows. metacity-theme-x.xml has provision to style left/right titled windows. This patch makes it possible to to create window themes that present clean side-by-side tiled windows.
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor-xrender.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 13e8e620..f70432a7 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -1025,6 +1025,19 @@ window_has_shadow (MetaCompWindow *cw)
return FALSE;
}
+ /* Do not add shadows for left/right tiled windows */
+ if (meta_window_is_tiled_left (cw->window))
+ {
+ meta_verbose ("Window has no shadow because it is tiled left\n");
+ return FALSE;
+ }
+
+ if (meta_window_is_tiled_right (cw->window))
+ {
+ meta_verbose ("Window has no shadow because it is tiled right\n");
+ return FALSE;
+ }
+
if (meta_window_get_frame (cw->window)) {
meta_verbose ("Window has shadow because it has a frame\n");
return TRUE;