[mutter] frames: don't force dark theme to all windows



commit 247909e16178832684b097ae5d7865dbe2c0a8ff
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Feb 4 15:26:50 2016 +0200

    frames: don't force dark theme to all windows
    
    Use global theme variant only if window does not have _GTK_THEME_VARIANT
    property. This allows applications to request default theme variant when
    global dark theme is enabled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761543

 src/ui/frames.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index b7f6ab9..3b88f43 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -447,7 +447,7 @@ meta_frames_new (int screen_number)
 }
 
 static const char *
-get_theme_variant_override (MetaFrames *frames)
+get_global_theme_variant (MetaFrames *frames)
 {
   GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (frames));
   GtkSettings *settings = gtk_settings_get_for_screen (screen);
@@ -474,17 +474,13 @@ meta_ui_frame_attach_style (MetaUIFrame *frame)
 {
   MetaFrames *frames = frame->frames;
   const char *variant;
-  const char *variant_override;
 
   if (frame->style_info != NULL)
     meta_style_info_unref (frame->style_info);
 
-  variant_override = get_theme_variant_override (frame->frames);
-
-  if (variant_override)
-    variant = variant_override;
-  else
-    variant = frame->meta_window->gtk_theme_variant;
+  variant = frame->meta_window->gtk_theme_variant;
+  if (variant == NULL)
+    variant = get_global_theme_variant (frame->frames);;
 
   if (variant == NULL || *variant == '\0')
     frame->style_info = meta_style_info_ref (frames->normal_style);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]