[gtk+/wip/otte/gtk4: 19/118] display: Insist that backends implement the monitor vfuncs
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gtk4: 19/118] display: Insist that backends implement the monitor vfuncs
- Date: Fri, 7 Oct 2016 00:01:17 +0000 (UTC)
commit 1fd52e0f4c992aa9a5127bed57a81e26fd67f990
Author: Benjamin Otte <otte redhat com>
Date: Fri Sep 9 14:52:06 2016 +0200
display: Insist that backends implement the monitor vfuncs
We cannot fallback anymore once we remove the ability to query screen
size, and that's about to happen.
gdk/gdkdisplay.c | 29 -----------------------------
1 files changed, 0 insertions(+), 29 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index f9bd55d..2d35d86 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -2544,32 +2544,6 @@ gdk_display_get_n_monitors (GdkDisplay *display)
return GDK_DISPLAY_GET_CLASS (display)->get_n_monitors (display);
}
-static GdkMonitor *
-get_fallback_monitor (GdkDisplay *display)
-{
- static GdkMonitor *monitor = NULL;
- GdkScreen *screen;
-
- if (monitor == NULL)
- {
- g_warning ("%s does not implement the monitor vfuncs", G_OBJECT_TYPE_NAME (display));
- monitor = gdk_monitor_new (display);
- gdk_monitor_set_manufacturer (monitor, "fallback");
- gdk_monitor_set_position (monitor, 0, 0);
- gdk_monitor_set_scale_factor (monitor, 1);
- }
-
- screen = gdk_display_get_default_screen (display);
- gdk_monitor_set_size (monitor,
- gdk_screen_get_width (screen),
- gdk_screen_get_height (screen));
- gdk_monitor_set_physical_size (monitor,
- gdk_screen_get_width_mm (screen),
- gdk_screen_get_height_mm (screen));
-
- return monitor;
-}
-
/**
* gdk_display_get_monitor:
* @display: a #GdkDisplay
@@ -2587,9 +2561,6 @@ gdk_display_get_monitor (GdkDisplay *display,
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- if (GDK_DISPLAY_GET_CLASS (display)->get_monitor == NULL)
- return get_fallback_monitor (display);
-
return GDK_DISPLAY_GET_CLASS (display)->get_monitor (display, monitor_num);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]