Tiling2: Fix a bug with reordering of windows in some cases.
authorTom Hacohen <tom@stosb.com>
Thu, 16 Jan 2014 11:32:53 +0000 (11:32 +0000)
committerTom Hacohen <tom@stosb.com>
Fri, 21 Feb 2014 09:15:06 +0000 (09:15 +0000)
src/modules/tiling/window_tree.c

index 41ee12e..d4aa500 100644 (file)
@@ -181,8 +181,9 @@ tiling_window_tree_remove(Window_Tree *root, Window_Tree *item)
 
                        EINA_INLIST_FOREACH_SAFE(item_keep->children, itr_safe, itr)
                          {
+                            /* We are prepending to double-reverse the order. */
                             grand_parent->children =
-                               eina_inlist_append_relative(grand_parent->children,
+                               eina_inlist_prepend_relative(grand_parent->children,
                                      EINA_INLIST_GET(itr), EINA_INLIST_GET(parent));
                             itr->weight *= parent->weight;
                             itr->parent = grand_parent;