[gtk+] Avoid an extra type check in gdk_screen_get_default
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid an extra type check in gdk_screen_get_default
- Date: Mon, 7 Sep 2015 07:19:41 +0000 (UTC)
commit f5fe1e3a06b6ea9160f9b05aaadd228a813bafb9
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 7 03:18:04 2015 -0400
Avoid an extra type check in gdk_screen_get_default
Just go through the vfunc directly.
gdk/gdkdisplaymanager.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c
index ceb3fcc..bc3471f 100644
--- a/gdk/gdkdisplaymanager.c
+++ b/gdk/gdkdisplaymanager.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]