box: Revert "Tweak the depth sorting function"
authorNeil Roberts <neil@linux.intel.com>
Tue, 23 Feb 2010 22:10:30 +0000 (22:10 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 24 Feb 2010 10:03:41 +0000 (10:03 +0000)
This reverts commit 939e56e2b12e5c96fa1173be33c2786ddfe57c25.

Changing the depth sort function to have inconsistent behaviour for
nodes that compare equal breaks the stability of g_list_sort. It ends
up so that every time clutter_container_sort_depth_order is called the
order of all actors with the same depth is reversed.

http://bugzilla.openedhand.com/show_bug.cgi?id=1988

clutter/clutter-box.c

index 9461aca..2667adb 100644 (file)
@@ -119,7 +119,7 @@ sort_by_depth (gconstpointer a,
   if (depth_a < depth_b)
     return -1;
 
-  if (depth_a >= depth_b)
+  if (depth_a > depth_b)
     return 1;
 
   return 0;