[gtk+] gdk: Deprecate gdk_display_get_screen
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Deprecate gdk_display_get_screen
- Date: Tue, 27 Oct 2015 01:18:22 +0000 (UTC)
commit aefa1ba61125a013c2c6103f50dc6de6bf5c16b6
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Oct 22 16:45:48 2015 +1300
gdk: Deprecate gdk_display_get_screen
demos/gtk-demo/changedisplay.c | 2 +-
gdk/gdkdisplay.c | 1 +
gdk/mir/gdkmireventsource.c | 2 +-
gdk/mir/gdkmirwindowimpl.c | 2 +-
gdk/x11/gdkdevice-core-x11.c | 2 +-
gdk/x11/gdkdevice-xi2.c | 2 +-
gtk/gtkmodules.c | 4 ++--
7 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/demos/gtk-demo/changedisplay.c b/demos/gtk-demo/changedisplay.c
index caa3ec6..f51d091 100644
--- a/demos/gtk-demo/changedisplay.c
+++ b/demos/gtk-demo/changedisplay.c
@@ -171,7 +171,7 @@ query_change_display (ChangeDisplayInfo *info)
"to move to the new screen");
if (toplevel)
- gtk_window_set_screen (GTK_WINDOW (toplevel), gdk_display_get_screen (info->current_display, 0));
+ gtk_window_set_screen (GTK_WINDOW (toplevel), gdk_display_get_default_screen (info->current_display));
else
gdk_display_beep (gdk_screen_get_display (screen));
}
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 892d6a7..29e359f 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1501,6 +1501,7 @@ gdk_display_get_n_screens (GdkDisplay *display)
* Returns: (transfer none): the #GdkScreen object
*
* Since: 2.2
+ * Deprecated: 3.20: There is only one screen; use gdk_display_get_default_screen() to get it.
*/
GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
index 5812481..fe9fc70 100644
--- a/gdk/mir/gdkmireventsource.c
+++ b/gdk/mir/gdkmireventsource.c
@@ -54,7 +54,7 @@ send_event (GdkWindow *window, GdkDevice *device, GdkEvent *event)
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, device);
- gdk_event_set_screen (event, gdk_display_get_screen (gdk_window_get_display (window), 0));
+ gdk_event_set_screen (event, gdk_display_get_default_screen (gdk_window_get_display (window)));
event->any.window = g_object_ref (window);
display = gdk_window_get_display (window);
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 05bec83..4690459 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -282,7 +282,7 @@ send_event (GdkWindow *window, GdkDevice *device, GdkEvent *event)
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, device);
- gdk_event_set_screen (event, gdk_display_get_screen (gdk_window_get_display (window), 0));
+ gdk_event_set_screen (event, gdk_display_get_default_screen (display));
event->any.window = g_object_ref (window);
display = gdk_window_get_display (window);
diff --git a/gdk/x11/gdkdevice-core-x11.c b/gdk/x11/gdkdevice-core-x11.c
index 1c10a13..7b8fbd9 100644
--- a/gdk/x11/gdkdevice-core-x11.c
+++ b/gdk/x11/gdkdevice-core-x11.c
@@ -472,7 +472,7 @@ gdk_x11_device_core_window_at_position (GdkDevice *device,
/* FIXME: untrusted clients case not multidevice-safe */
pointer_window = None;
- screen = gdk_display_get_screen (display, 0);
+ screen = gdk_display_get_default_screen (display);
toplevels = gdk_screen_get_toplevel_windows (screen);
for (list = toplevels; list != NULL; list = list->next)
{
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index a77002e..624d268 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -542,7 +542,7 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
/* FIXME: untrusted clients case not multidevice-safe */
pointer_window = None;
- screen = gdk_display_get_screen (display, 0);
+ screen = gdk_display_get_default_screen (display);
toplevels = gdk_screen_get_toplevel_windows (screen);
for (list = toplevels; list != NULL; list = list->next)
{
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 1af2c1d..8f1aea7 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -464,7 +464,7 @@ display_closed_cb (GdkDisplay *display,
GdkScreen *screen;
GtkSettings *settings;
- screen = gdk_display_get_screen (display, 0);
+ screen = gdk_display_get_default_screen (display);
settings = gtk_settings_get_for_screen (screen);
g_object_set_data_full (G_OBJECT (settings),
@@ -494,7 +494,7 @@ display_opened_cb (GdkDisplayManager *display_manager,
}
g_value_init (&value, G_TYPE_STRING);
- screen = gdk_display_get_screen (display, 0);
+ screen = gdk_display_get_default_screen (display);
if (gdk_screen_get_setting (screen, "gtk-modules", &value))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]