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).
This commit is contained in:
parent
ca13cec01c
commit
bae07700a1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user