From 684da81271dcc184a8c46b1af6c83fad0aac35f3 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 15 Jul 2006 17:10:12 +0000 Subject: [PATCH] limit scroll so you dont go off the ends SVN revision: 23950 --- src/bin/e_fm.c | 4 ++++ src/bin/e_test.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 8d01d63c9..f0aeb2aa7 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -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; diff --git a/src/bin/e_test.c b/src/bin/e_test.c index 10a34b706..1ad98f702 100644 --- a/src/bin/e_test.c +++ b/src/bin/e_test.c @@ -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) {