summaryrefslogtreecommitdiff
path: root/plugins/media-keys/msd-media-keys-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/media-keys/msd-media-keys-manager.c')
-rw-r--r--plugins/media-keys/msd-media-keys-manager.c12
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);
}