summaryrefslogtreecommitdiff
path: root/packages/e17/e-wm/fudge-menu-autoscroll.patch
blob: e2216986e2f711c4e49442d31612d57bbb4ba2d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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;
 	       }