[gtk+] GDK W32: fix monitor pruning code
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GDK W32: fix monitor pruning code
- Date: Sat, 2 Dec 2017 11:24:02 +0000 (UTC)
commit 323a601123c341886c39f55096d656c750f028a9
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Thu Nov 23 07:15:28 2017 +0000
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.
gdk/win32/gdkmonitor-win32.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gdk/win32/gdkmonitor-win32.c b/gdk/win32/gdkmonitor-win32.c
index 56b4a84..2f7afd3 100644
--- a/gdk/win32/gdkmonitor-win32.c
+++ b/gdk/win32/gdkmonitor-win32.c
@@ -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--);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]