summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-04 15:26:50 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-04 16:02:21 +0200
commit247909e16178832684b097ae5d7865dbe2c0a8ff (patch)
tree6e2c1802e36c7ee2d7fdaf0146fb70710ee6de44
parente5ce6192f47173888cbb153ddeeccf7722bb84b1 (diff)
downloadmutter-247909e16178832684b097ae5d7865dbe2c0a8ff.tar.gz
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
-rw-r--r--src/ui/frames.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c
index b7f6ab962..3b88f4379 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);