summaryrefslogtreecommitdiff
path: root/typing-break
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-01 16:29:45 +0200
committerZenWalker <[email protected]>2017-08-01 16:29:45 +0200
commit3c9a2f357f52ca69f56523ccc98081d5561fc7e2 (patch)
tree105dc1db883a918372371646b86eb142e37fcc08 /typing-break
parent5945276ff2e3570435494bc942bfac53ed68952d (diff)
downloadmate-control-center-3c9a2f357f52ca69f56523ccc98081d5561fc7e2.tar.bz2
mate-control-center-3c9a2f357f52ca69f56523ccc98081d5561fc7e2.tar.xz
avoid deprecated gdk_display_get_screen and gdk_display_get_n_screens
Diffstat (limited to 'typing-break')
-rw-r--r--typing-break/drwright.c10
1 files 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);