Avoid an extra type check in gdk_screen_get_default

Just go through the vfunc directly.
This commit is contained in:
Matthias Clasen 2015-09-07 03:18:04 -04:00
parent 0f92a43e10
commit f5fe1e3a06

View File

@ -363,12 +363,12 @@ gdk_display_get_default (void)
GdkScreen *
gdk_screen_get_default (void)
{
GdkDisplay *default_display;
GdkDisplay *display;
default_display = gdk_display_get_default ();
display = gdk_display_get_default ();
if (default_display)
return gdk_display_get_default_screen (default_display);
if (display)
return GDK_DISPLAY_GET_CLASS (display)->get_default_screen (display);
else
return NULL;
}