diff options
author | ZenWalker <[email protected]> | 2017-08-01 02:40:51 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-09 22:07:03 +0200 |
commit | daa0acc2088b8501c3c55134f8f21f3e853ca83d (patch) | |
tree | a2ee25376922bafd9614e4f58bb56f01a77b995b /plugins/media-keys | |
parent | 9568139c78f5d5621f87faee2db423fd9e1aa619 (diff) | |
download | mate-settings-daemon-daa0acc2088b8501c3c55134f8f21f3e853ca83d.tar.bz2 mate-settings-daemon-daa0acc2088b8501c3c55134f8f21f3e853ca83d.tar.xz |
avoid deprecated gdk_display_get_screen and gdk_display_get_n_screens
Diffstat (limited to 'plugins/media-keys')
-rw-r--r-- | plugins/media-keys/msd-media-keys-manager.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index 1a8d291..9533968 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -107,16 +107,14 @@ static void init_screens (MsdMediaKeysManager *manager) { GdkDisplay *display; - int i; display = gdk_display_get_default (); - for (i = 0; i < gdk_display_get_n_screens (display); i++) { - GdkScreen *screen; - screen = gdk_display_get_screen (display, i); - if (screen == NULL) { - continue; - } + GdkScreen *screen; + + screen = gdk_display_get_default_screen (display); + + if (screen != NULL) { manager->priv->screens = g_slist_append (manager->priv->screens, screen); } |