mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
gdk: enable rgba visuals by default
Unless GDK_RGBA=0 is set. https://bugzilla.gnome.org/show_bug.cgi?id=630217
This commit is contained in:
parent
b617b003ef
commit
a2ccb6601e
@ -478,6 +478,15 @@ nevertheless.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GDK_RGBA</envar></title>
|
||||
|
||||
<para>
|
||||
Since 3.12, this environment variable can be used to prevent
|
||||
using RGBA visuals on the X11 backend by setting GDK_RGBA=0.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
|
||||
|
||||
|
@ -285,6 +285,14 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
|
||||
}
|
||||
}
|
||||
|
||||
/* prefer the RGBA visual unless GDK_RGBA=0 */
|
||||
if (x11_screen->rgba_visual)
|
||||
{
|
||||
const gchar *csd_env = g_getenv ("GDK_RGBA");
|
||||
if (g_strcmp0 (csd_env, "0") != 0)
|
||||
x11_screen->system_visual = x11_screen->rgba_visual;
|
||||
}
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (_gdk_debug_flags & GDK_DEBUG_MISC)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user