[gtk+] gdk: Finish conversion to in-struct GdkWindow list nodes
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Finish conversion to in-struct GdkWindow list nodes
- Date: Mon, 21 Sep 2015 15:00:04 +0000 (UTC)
commit 9bda0532f8770e726b9b90ce6fc687b87ba2037f
Author: Alexander Larsson <alexl redhat com>
Date: Mon Sep 21 15:33:53 2015 +0200
gdk: Finish conversion to in-struct GdkWindow list nodes
gdk/gdkoffscreenwindow.c | 4 ++--
gdk/win32/gdkwindow-win32.c | 7 +++----
gdk/x11/gdkwindow-x11.c | 2 +-
3 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 614e3f0..a022795 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -195,7 +195,7 @@ gdk_offscreen_window_reparent (GdkWindow *window,
gdk_window_hide (window);
if (window->parent)
- window->parent->children = g_list_remove (window->parent->children, window);
+ window->parent->children = g_list_remove_link (window->parent->children, &window->children_list_node);
old_parent = window->parent;
window->parent = new_parent;
@@ -203,7 +203,7 @@ gdk_offscreen_window_reparent (GdkWindow *window,
window->y = y;
if (new_parent)
- window->parent->children = g_list_prepend (window->parent->children, window);
+ window->parent->children = g_list_concat (&window->children_list_node, window->parent->children);
_gdk_synthesize_crossing_events_for_geometry_change (window);
if (old_parent)
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 88a9478..67519aa 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -760,7 +760,7 @@ gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
if (!window->parent || GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_FOREIGN)
window->parent = _gdk_root;
- window->parent->children = g_list_prepend (window->parent->children, window);
+ window->parent->children = g_list_concat (&window->children_list_node, window->parent->children);
window->parent->impl_window->native_children =
g_list_prepend (window->parent->impl_window->native_children, window);
@@ -1504,10 +1504,9 @@ gdk_win32_window_reparent (GdkWindow *window,
}
if (old_parent)
- old_parent->children =
- g_list_remove (old_parent->children, window);
+ old_parent->children = g_list_remove_link (old_parent->children, &window->children_list_node);
- parent->children = g_list_prepend (parent->children, window);
+ parent->children = g_list_concat (&window->children_list_node, parent->children);
return FALSE;
}
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 1ace677..d08cee0 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -1239,7 +1239,7 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display,
if (!win->parent || GDK_WINDOW_TYPE (win->parent) == GDK_WINDOW_FOREIGN)
win->parent = gdk_screen_get_root_window (screen);
- win->parent->children = g_list_prepend (win->parent->children, win);
+ win->parent->children = g_list_concat (&win->children_list_node, win->parent->children);
win->parent->impl_window->native_children =
g_list_prepend (win->parent->impl_window->native_children, win);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]