mirror of
https://github.com/brl/mutter.git
synced 2025-03-28 22:23:47 +00:00
[group] Use floating point in sort_z_order
This commit is contained in:
parent
d8d344f529
commit
f1d5881207
@ -531,12 +531,16 @@ static gint
|
|||||||
sort_z_order (gconstpointer a,
|
sort_z_order (gconstpointer a,
|
||||||
gconstpointer b)
|
gconstpointer b)
|
||||||
{
|
{
|
||||||
int depth_a, depth_b;
|
float depth_a, depth_b;
|
||||||
|
|
||||||
depth_a = clutter_actor_get_depth (CLUTTER_ACTOR(a));
|
depth_a = clutter_actor_get_depth (CLUTTER_ACTOR(a));
|
||||||
depth_b = clutter_actor_get_depth (CLUTTER_ACTOR(b));
|
depth_b = clutter_actor_get_depth (CLUTTER_ACTOR(b));
|
||||||
|
|
||||||
return (depth_a - depth_b);
|
if (depth_a < depth_b)
|
||||||
|
return -1;
|
||||||
|
if (depth_a > depth_b)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user