[mutter] default plugin: use the right type for varargs



commit 3aad30143c0abdf24bfbaa12454cfeba6b8047ab
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Apr 10 03:43:09 2012 +0200

    default plugin: use the right type for varargs
    
    Coordinates in Clutter are double, so twice the size of an int, and
    if not correctly casted memory corruption occurs.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673809

 src/compositor/plugins/default.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c
index b7bb63b..368135e 100644
--- a/src/compositor/plugins/default.c
+++ b/src/compositor/plugins/default.c
@@ -479,8 +479,8 @@ minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
                                          MINIMIZE_TIMEOUT,
                                          "scale-x", 0.0,
                                          "scale-y", 0.0,
-                                         "x", icon_geometry.x,
-                                         "y", icon_geometry.y,
+                                         "x", (double)icon_geometry.x,
+                                         "y", (double)icon_geometry.y,
                                          NULL);
       apriv->tml_minimize = clutter_animation_get_timeline (animation);
       data->plugin = plugin;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]