mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Use gdk_screen_get_preferred_visual()
When creating windows, and when returning a widgets visual, use the new API to get the preferred visual.
This commit is contained in:
parent
2b95d1a34e
commit
30fa1426cf
@ -1332,7 +1332,7 @@ gdk_window_new (GdkWindow *parent,
|
||||
if (attributes_mask & GDK_WA_VISUAL)
|
||||
window->visual = attributes->visual;
|
||||
else
|
||||
window->visual = gdk_screen_get_system_visual (screen);
|
||||
window->visual = gdk_screen_get_preferred_visual (screen);
|
||||
|
||||
window->event_mask = attributes->event_mask;
|
||||
|
||||
|
@ -10863,14 +10863,9 @@ gtk_widget_get_visual (GtkWidget *widget)
|
||||
g_warning ("Ignoring visual set on widget `%s' that is not on the correct screen.",
|
||||
gtk_widget_get_name (widget));
|
||||
}
|
||||
}
|
||||
|
||||
visual = gdk_screen_get_rgba_visual (screen);
|
||||
|
||||
if (visual == NULL ||
|
||||
g_strcmp0 (g_getenv ("GDK_RGBA"), "0") != 0)
|
||||
visual = gdk_screen_get_system_visual (screen);
|
||||
|
||||
return visual;
|
||||
return gdk_screen_get_preferred_visual (screen);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user