mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Revert "Introduce API to get the preferred visual"
This reverts commit 2b95d1a34e
.
Conflicts:
gdk/gdkscreen.c
This commit is contained in:
parent
d326507978
commit
3459a0a273
@ -195,7 +195,6 @@ GdkScreen
|
||||
gdk_screen_get_default
|
||||
gdk_screen_get_system_visual
|
||||
gdk_screen_get_rgba_visual
|
||||
gdk_screen_get_preferred_visual
|
||||
gdk_screen_is_composited
|
||||
gdk_screen_get_root_window
|
||||
gdk_screen_get_display
|
||||
|
@ -478,15 +478,6 @@ 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>
|
||||
|
||||
|
@ -912,36 +912,6 @@ gdk_screen_get_rgba_visual (GdkScreen *screen)
|
||||
return GDK_SCREEN_GET_CLASS (screen)->get_rgba_visual (screen);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_screen_get_preferred_visual:
|
||||
* @screen: a #GdkScreen
|
||||
*
|
||||
* Returns the visual that is preferred when creating windows.
|
||||
*
|
||||
* This will be the visual returned by gdk_screen_get_rgba_visual()
|
||||
* unless that is not available, or unless the environment
|
||||
* variable `GDK_RGBA` is set to `0`.
|
||||
*
|
||||
* Return value: (transfer none): the preferred visual to use
|
||||
* for windows
|
||||
*
|
||||
* Since: 3.12
|
||||
*/
|
||||
GdkVisual *
|
||||
gdk_screen_get_preferred_visual (GdkScreen *screen)
|
||||
{
|
||||
GdkVisual *visual;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_screen_is_composited:
|
||||
* @screen: a #GdkScreen
|
||||
|
@ -45,8 +45,6 @@ GDK_AVAILABLE_IN_ALL
|
||||
GdkVisual * gdk_screen_get_system_visual (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkVisual * gdk_screen_get_rgba_visual (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_3_12
|
||||
GdkVisual * gdk_screen_get_preferred_visual (GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_screen_is_composited (GdkScreen *screen);
|
||||
|
||||
|
@ -66,7 +66,6 @@ struct _GdkScreenClass
|
||||
GList * (* list_visuals) (GdkScreen *screen);
|
||||
GdkVisual * (* get_system_visual) (GdkScreen *screen);
|
||||
GdkVisual * (* get_rgba_visual) (GdkScreen *screen);
|
||||
GdkVisual * (* get_preferred_visual) (GdkScreen *screen);
|
||||
gboolean (* is_composited) (GdkScreen *screen);
|
||||
gchar * (* make_display_name) (GdkScreen *screen);
|
||||
GdkWindow * (* get_active_window) (GdkScreen *screen);
|
||||
|
@ -10880,14 +10880,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_system_visual (screen);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user