forked from AuroraMiddleware/gtk
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:
parent
50bbac6005
commit
323a601123
@ -766,10 +766,7 @@ prune_monitors (EnumMonitorData *data)
|
|||||||
m = g_ptr_array_index (data->monitors, i);
|
m = g_ptr_array_index (data->monitors, i);
|
||||||
|
|
||||||
if (m->remove)
|
if (m->remove)
|
||||||
{
|
g_ptr_array_remove_index (data->monitors, i--);
|
||||||
g_ptr_array_remove_index (data->monitors, i);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user