GDK W32: fix monitor pruning code
Decrement the counter for each removed element, otherwise we skip one element every time we remove one. Also, no need for continue here.
This commit is contained in:
@ -766,10 +766,7 @@ prune_monitors (EnumMonitorData *data)
|
||||
m = g_ptr_array_index (data->monitors, i);
|
||||
|
||||
if (m->remove)
|
||||
{
|
||||
g_ptr_array_remove_index (data->monitors, i);
|
||||
continue;
|
||||
}
|
||||
g_ptr_array_remove_index (data->monitors, i--);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user