fix win center trap for elm to pass in h and v params
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 6 Feb 2015 02:32:55 +0000 (11:32 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 6 Feb 2015 02:32:55 +0000 (11:32 +0900)
while this is technically an abi break, it should actually have no
real impact. it will have warnings - sure, but running existing code
will simply not see the extra parammeters on the stack and not use
them so it'll continue to work. if we removed paramms, we'd be in
pain. (same applies to params passed in registers).

this fixes T2031

src/lib/elm_win.c
src/lib/elm_win_common.h

index 8180c80..d713223 100644 (file)
@@ -3791,7 +3791,7 @@ _elm_win_center(Eo *obj, Elm_Win_Data *sd, Eina_Bool h, Eina_Bool v)
 {
    int win_w, win_h, screen_w, screen_h, nx, ny;
 
-   if ((trap) && (trap->center) && (!trap->center(sd->trap_data, obj)))
+   if ((trap) && (trap->center) && (!trap->center(sd->trap_data, obj, h, v)))
      return;
 
    ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &screen_w, &screen_h);
index 7e45a3a..b1e16fb 100644 (file)
@@ -163,7 +163,7 @@ struct _Elm_Win_Trap
    Eina_Bool (*show)(void *data, Evas_Object *o);
    Eina_Bool (*move)(void *data, Evas_Object *o, int x, int y);
    Eina_Bool (*resize)(void *data, Evas_Object *o, int w, int h);
-   Eina_Bool (*center)(void *data, Evas_Object *o); /* not in ecore_evas, but nice to trap */
+   Eina_Bool (*center)(void *data, Evas_Object *o, Eina_Bool h, Eina_Bool v); /* not in ecore_evas, but nice to trap */
    Eina_Bool (*lower)(void *data, Evas_Object *o);
    Eina_Bool (*raise)(void *data, Evas_Object *o);
    Eina_Bool (*activate)(void *data, Evas_Object *o);