diff --git a/demos/gtk-demo/changedisplay.c b/demos/gtk-demo/changedisplay.c index caa3ec6964..f51d091596 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 892d6a73f9..29e359fcf6 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 5812481756..fe9fc70607 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 05bec83d4d..4690459c2c 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 1c10a13954..7b8fbd981f 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 a77002e700..624d2688d8 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 1af2c1dfe5..8f1aea7d13 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)) {