summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2017-10-20 18:53:23 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2017-10-20 18:53:23 +0300
commitdc397554d33d66ce9e44812a52df8893badb708f (patch)
treee4024e2a4fb0b356fd8ae11bf55ba71a8c2fb2e5
parent3e0617cf3bbcda64cf1868f6a50d4303a8091caa (diff)
downloadmetacity-dc397554d33d66ce9e44812a52df8893badb708f.tar.gz
compositor: fix missing shadow from some windows
If window is not client side decorated then we should add shadow also when using GTK+ theme. https://bugzilla.gnome.org/show_bug.cgi?id=789251
-rw-r--r--src/compositor/meta-compositor-xrender.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 7e3766b0..36e986a2 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -970,6 +970,13 @@ window_has_shadow (MetaCompositorXRender *xrender,
if (xrender->have_shadows == FALSE)
return FALSE;
+ /* Do not add shadows to client side decorated windows */
+ if (meta_window_is_client_decorated (cw->window))
+ {
+ meta_verbose ("Window might have shadow because it is client side decorated\n");
+ return FALSE;
+ }
+
/* Do not add shadows to fullscreen windows */
if (meta_window_is_fullscreen (cw->window))
{
@@ -984,15 +991,16 @@ window_has_shadow (MetaCompositorXRender *xrender,
return FALSE;
}
- /* Do not add shadows if GTK+ theme is used */
- if (meta_prefs_get_theme_type () == META_THEME_TYPE_GTK)
- {
- meta_verbose ("Window has shadow from GTK+ theme\n");
- return FALSE;
- }
-
+ /* Add shadows to windows with frame */
if (meta_window_get_frame (cw->window))
{
+ /* Do not add shadows if GTK+ theme is used */
+ if (meta_prefs_get_theme_type () == META_THEME_TYPE_GTK)
+ {
+ meta_verbose ("Window might have shadow from GTK+ theme\n");
+ return FALSE;
+ }
+
meta_verbose ("Window has shadow because it has a frame\n");
return TRUE;
}