From dcc38e397941224665cc8614c41e35e9a73469f8 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 6 Feb 2015 11:32:55 +0900 Subject: [PATCH] fix win center trap for elm to pass in h and v params 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 | 2 +- src/lib/elm_win_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 8180c80..d713223 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -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); diff --git a/src/lib/elm_win_common.h b/src/lib/elm_win_common.h index 7e45a3a..b1e16fb 100644 --- a/src/lib/elm_win_common.h +++ b/src/lib/elm_win_common.h @@ -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); -- 2.7.4