Patch to fudge screen edges for menu autoscrolling works now
authorJustin Patrin <papercrane@gmail.com>
Tue, 16 Aug 2005 06:45:02 +0000 (06:45 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Tue, 16 Aug 2005 06:45:02 +0000 (06:45 +0000)
This patch makes it so that when a menu is off the screen and the cursor is within 10px of the edge of the screen the menu is autoscrolled
This normally happens only when you're right at the edge, which is hard to do with a touchscreen

packages/e17/e-wm/fudge-menu-autoscroll.patch [new file with mode: 0644]
packages/e17/e-wm/fudge_screen_edges_for_menu.patch [deleted file]
packages/e17/e-wm_20050810.bb

diff --git a/packages/e17/e-wm/fudge-menu-autoscroll.patch b/packages/e17/e-wm/fudge-menu-autoscroll.patch
new file mode 100644 (file)
index 0000000..e221698
--- /dev/null
@@ -0,0 +1,63 @@
+--- e/src/bin/e_menu.c~        2005-08-15 23:09:53.000000000 -0700
++++ e/src/bin/e_menu.c 2005-08-15 23:10:07.000000000 -0700
+@@ -1968,24 +1968,24 @@
+       E_Menu *m;
+       m = l->data;
+-      if (m->cur.x < m->zone->x)
++      if (m->cur.x < m->zone->x + 10)
+         {
+-           i = m->zone->x - m->cur.x;
++           i = m->zone->x - m->cur.x + 10;
+            if (i > outl) outl = i;
+         }
+-      if (m->cur.y < m->zone->y)
++      if (m->cur.y < m->zone->y + 10)
+         {
+-           i = m->zone->y - m->cur.y;
++           i = m->zone->y - m->cur.y + 10;
+            if (i > outt) outt = i;
+         }
+-      if ((m->cur.x + m->cur.w) > (m->zone->w))
++      if ((m->cur.x + m->cur.w) > (m->zone->w - 10))
+         {
+-           i = m->cur.x + m->cur.w - (m->zone->x + m->zone->w);
++           i = m->cur.x + m->cur.w - (m->zone->x + m->zone->w - 10);
+            if (i > outr) outr = i;
+         }
+-      if ((m->cur.y + m->cur.h) > (m->zone->h))
++      if ((m->cur.y + m->cur.h) > (m->zone->h - 10))
+         {
+-           i = m->cur.y + m->cur.h - (m->zone->y + m->zone->h);
++           i = m->cur.y + m->cur.h - (m->zone->y + m->zone->h - 10);
+            if (i > outb) outb = i;
+         }
+      }
+@@ -2029,11 +2029,11 @@
+    int autoscroll_x = 0;
+    int autoscroll_y = 0;
+    
+-   if (_e_menu_x == 0)
++   if (_e_menu_x - 10 <= 0)
+      {
+       if (_e_menu_outside_bounds_get(-1, 0)) autoscroll_x = -1;
+      }
+-   if (_e_menu_y == 0)
++   if (_e_menu_y - 10 <= 0)
+      {
+       if (_e_menu_outside_bounds_get(0, -1)) autoscroll_y = -1;
+      }
+@@ -2044,11 +2044,11 @@
+            E_Menu *m;
+            
+            m = _e_active_menus->data;
+-           if (_e_menu_x == (m->zone->w - 1))
++           if (_e_menu_x + 10 >= (m->zone->w - 1))
+              {
+                 if (_e_menu_outside_bounds_get(1, 0)) autoscroll_x = 1;
+              }
+-           if (_e_menu_y == (m->zone->h - 1))
++           if (_e_menu_y + 10 >= (m->zone->h - 1))
+              {
+                 if (_e_menu_outside_bounds_get(0, 1)) autoscroll_y = 1;
+              }
diff --git a/packages/e17/e-wm/fudge_screen_edges_for_menu.patch b/packages/e17/e-wm/fudge_screen_edges_for_menu.patch
deleted file mode 100644 (file)
index c203fd4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- e/src/bin/e_menu.c.~1.38.~ 2005-07-25 02:55:44.000000000 -0700
-+++ e/src/bin/e_menu.c 2005-08-11 15:36:23.000000000 -0700
-@@ -1968,22 +1968,22 @@
-       E_Menu *m;
-       m = l->data;
--      if (m->cur.x < m->zone->x)
-+      if (m->cur.x < m->zone->x + 5)
-         {
-            i = m->zone->x - m->cur.x;
-            if (i > outl) outl = i;
-         }
--      if (m->cur.y < m->zone->y)
-+      if (m->cur.y < m->zone->y + 5)
-         {
-            i = m->zone->y - m->cur.y;
-            if (i > outt) outt = i;
-         }
--      if ((m->cur.x + m->cur.w) > (m->zone->w))
-+      if ((m->cur.x + m->cur.w) > (m->zone->w - 5))
-         {
-            i = m->cur.x + m->cur.w - (m->zone->x + m->zone->w);
-            if (i > outr) outr = i;
-         }
--      if ((m->cur.y + m->cur.h) > (m->zone->h))
-+      if ((m->cur.y + m->cur.h) > (m->zone->h - 5))
-         {
-            i = m->cur.y + m->cur.h - (m->zone->y + m->zone->h);
-            if (i > outb) outb = i;
index 180f2f8..b931751 100644 (file)
@@ -8,7 +8,7 @@ PR = "r0"
 
 SRC_URI = "cvs://anonymous@cvs.sourceforge.net/cvsroot/enlightenment;module=e17/apps/e \
            file://fix-configure.patch;patch=1 \
-           file://fudge_screen_edges_for_menu.patch;patch=1"
+           file://fudge-menu-autoscroll.patch;patch=1"
 S = "${WORKDIR}/e"
 
 inherit autotools