GNOME Bugzilla – Bug 761476
Set _GTK_THEME_VARIANT property also for light/normal theme variant
Last modified: 2016-02-04 10:30:02 UTC
Currently _GTK_THEME_VARIANT property is set only if theme variant is dark, otherwise property is removed. Please consider setting this property always even when theme variant is light/default. The problem is that currently there is no way to detect if window does not support theme variants or light theme variant is requested. There is at least one case where this can be considered as bug: 1) User has enabled Global Dark Theme 2) User has set GNOME Terminal to use light theme variant 3) Mutter shows dark theme decoration, but window itself use correct - light theme variant. It would be nice if it could work like this: 1) If windows does not have _GTK_THEME_VARIANT - window manager can use default theme variant - light or dark if it is enabled globally (in settings.ini) 2) If property is set - then use variant based on value it has. empty string should be considered as light/normal theme variant. diff for gdkwindow-x11.c: - gdk_x11_window_set_utf8_property (window, "_GTK_THEME_VARIANT", variant); + gdk_x11_window_set_utf8_property (window, "_GTK_THEME_VARIANT", + variant ? variant : "");
The culprit here is 'global dark theme' - somebody decided that was cool to add without thinking through the consequences. It doesn't fit in the original design for how dark themes are meant to work.
That is why I wrote 'can be considered as bug' not 'it is bug'. Still it would be nice if it would be possible to make it work. Do you think that setting this property to empty string is something wrong and/or can cause major problems?
I think setting the property to the empty string is ok
Created attachment 320414 [details] [review] gdkwindow-x11: always set _GTK_THEME_VARIANT property Set _GTK_THEME_VARIANT to empty string when default theme variant is used. This will allow to understand whether _GTK_THEME_VARIANT is not supported or default variant is requested.
(In reply to Matthias Clasen from comment #3) > I think setting the property to the empty string is ok Thanks! Can I push attached patch?
Review of attachment 320414 [details] [review]: ok
Thanks!