[metacity] compositor: fix missing shadow from some windows
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] compositor: fix missing shadow from some windows
- Date: Fri, 20 Oct 2017 16:03:44 +0000 (UTC)
commit dc397554d33d66ce9e44812a52df8893badb708f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Oct 20 18:53:23 2017 +0300
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
src/compositor/meta-compositor-xrender.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 7e3766b..36e986a 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]