limit scroll so you dont go off the ends

SVN revision: 23950
This commit is contained in:
Carsten Haitzler 2006-07-15 17:10:12 +00:00
parent 6c4b19d5d0
commit 684da81271
2 changed files with 5 additions and 1 deletions

View File

@ -211,6 +211,10 @@ e_fm2_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
if (!sd) return; // safety
if (!evas_object_type_get(obj)) return; // safety
if (strcmp(evas_object_type_get(obj), "e_fm")) return; // safety
if (x > (sd->max.w - sd->w)) x = sd->max.w - sd->w;
if (x < 0) x = 0;
if (y > (sd->max.h - sd->h)) y = sd->max.h - sd->h;
if (y < 0) y = 0;
if ((sd->pos.x == x) && (sd->pos.y == y)) return;
sd->pos.x = x;
sd->pos.y = y;

View File

@ -584,7 +584,7 @@ _e_test_internal(E_Container *con)
evas_object_focus_set(o, 1);
}
#elif 0
#elif 1
static void
_e_test_internal(E_Container *con)
{