e pan/scrollframe - fix garbage pan values that happen temporarily

during setup garbage pan positions can be set due to uninitialized
local variables. fix that to initialize.

@fix
devs/bu5hm4n/bugfixing
Carsten Haitzler 5 years ago
parent 20130aec91
commit 6da22e22f8
  1. 6
      src/bin/e_pan.c
  2. 4
      src/bin/e_scrollframe.c

@ -144,7 +144,7 @@ static void
_e_smart_child_resize_hook(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Smart_Data *sd;
Evas_Coord w, h;
Evas_Coord w = 0, h = 0;
sd = data;
if (!sd->child_obj) return;
@ -173,10 +173,14 @@ _e_smart_add(Evas_Object *obj)
sd = E_NEW(E_Smart_Data, 1);
if (!sd) return;
sd->smart_obj = obj;
sd->px = 0;
sd->py = 0;
sd->x = 0;
sd->y = 0;
sd->w = 0;
sd->h = 0;
sd->child_w = 0;
sd->child_h = 0;
evas_object_smart_data_set(obj, sd);
}

@ -733,7 +733,7 @@ static void
_e_smart_scrollbar_read(E_Smart_Data *sd)
{
Evas_Coord x, y, mx = 0, my = 0;
double vx, vy;
double vx = 0.0, vy = 0.0;
edje_object_part_drag_value_get(sd->edje_obj, "e.dragable.vbar", NULL, &vy);
edje_object_part_drag_value_get(sd->edje_obj, "e.dragable.hbar", &vx, NULL);
@ -915,7 +915,7 @@ _e_smart_scrollbar_size_adjust(E_Smart_Data *sd)
if ((sd->child_obj) || (sd->extern_pan))
{
Evas_Coord x = 0, y = 0, w = 0, h = 0, mx = 0, my = 0, vw = 0, vh = 0;
double vx, vy, size;
double vx = 0.0, vy = 0.0, size = 0.0;
edje_object_calc_force(sd->edje_obj);
edje_object_part_geometry_get(sd->edje_obj, "e.swallow.content",

Loading…
Cancel
Save