[gnome-shell] shell_global_get_primary_monitor: Use variable to store number of monitors
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell_global_get_primary_monitor: Use variable to store number of monitors
- Date: Sun, 4 Apr 2010 16:13:40 +0000 (UTC)
commit bae07700a18db0a462d37f0558063aaa9040ed3d
Author: Adel Gadllah <adel gadllah gmail com>
Date: Sun Apr 4 18:11:37 2010 +0200
shell_global_get_primary_monitor: Use variable to store number of monitors
See https://bugzilla.gnome.org/show_bug.cgi?id=608647#c5
(forgot to add it before commiting).
src/shell-global.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 92855c5..8077b9d 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -1107,8 +1107,9 @@ shell_global_get_primary_monitor (ShellGlobal *global)
GdkRectangle rect;
gint i, primary = 0;
gchar *output_name = NULL;
+ gint num_monitors = gdk_screen_get_n_monitors (screen);
- for (i = 0; i < gdk_screen_get_n_monitors (screen); i++)
+ for (i = 0; i < num_monitors; i++)
{
/* Prefer the laptop's internal screen if present */
output_name = gdk_screen_get_monitor_plug_name (screen, i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]