gdk: Deprecate gdk_display_get_screen

This commit is contained in:
Robert Ancell 2015-10-22 16:45:48 +13:00
parent db04c1eda7
commit aefa1ba611
7 changed files with 8 additions and 7 deletions

View File

@ -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));
}

View File

@ -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,

View File

@ -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);

View File

@ -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);

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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))
{