summaryrefslogtreecommitdiff
path: root/gtk/gtksettings.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-10-30 16:50:14 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-10-30 16:50:14 -0400
commitf9cc7ca1406b14bdbb9fd52c10a7600ff1f38026 (patch)
treee1b11bf6cd16da229055da3517e22e9a6a051b4a /gtk/gtksettings.c
parent6dbb1e20a66743ee088790cfe8ac6396d96033cd (diff)
downloadgtk+-f9cc7ca1406b14bdbb9fd52c10a7600ff1f38026.tar.gz
Add gtk_settings_get_for_display
This will help us avoiding screens in many places.
Diffstat (limited to 'gtk/gtksettings.c')
-rw-r--r--gtk/gtksettings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index b89a6f64b7..94c4c83dcd 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -1247,11 +1247,13 @@ gtk_settings_create_for_display (GdkDisplay *display)
return settings;
}
-static GtkSettings *
+GtkSettings *
gtk_settings_get_for_display (GdkDisplay *display)
{
int i;
+ g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
+
if G_UNLIKELY (display_settings == NULL)
display_settings = g_ptr_array_new ();