From 3c9a2f357f52ca69f56523ccc98081d5561fc7e2 Mon Sep 17 00:00:00 2001 From: ZenWalker Date: Tue, 1 Aug 2017 16:29:45 +0200 Subject: avoid deprecated gdk_display_get_screen and gdk_display_get_n_screens --- typing-break/drwright.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/typing-break/drwright.c b/typing-break/drwright.c index c526bec8..2a07f040 100644 --- a/typing-break/drwright.c +++ b/typing-break/drwright.c @@ -769,18 +769,14 @@ create_secondary_break_windows (void) GdkDisplay *display; GdkScreen *screen; GtkWidget *window; - gint i; GList *windows = NULL; display = gdk_display_get_default (); - for (i = 0; i < gdk_display_get_n_screens (display); i++) { - screen = gdk_display_get_screen (display, i); + screen = gdk_display_get_default_screen (display); - if (screen == gdk_screen_get_default ()) { - /* Handled by DrwBreakWindow. */ - continue; - } + if (screen != gdk_screen_get_default ()) { + /* Handled by DrwBreakWindow. */ window = gtk_window_new (GTK_WINDOW_POPUP); -- cgit v1.2.1