]> git.pld-linux.org Git - packages/WindowMaker.git/blob - WindowMaker-singleclick.patch
- _really_ updated to 0.63.1
[packages/WindowMaker.git] / WindowMaker-singleclick.patch
1 diff -Naur WindowMaker-0.63.1/src/WindowMaker.h WindowMaker-0.63.1-p/src/WindowMaker.h
2 --- WindowMaker-0.63.1/src/WindowMaker.h        Fri Nov 17 03:10:32 2000
3 +++ WindowMaker-0.63.1-p/src/WindowMaker.h      Mon Jan  8 12:15:41 2001
4 @@ -424,6 +424,9 @@
5      /* shading animation */
6      signed char shade_speed;
7  
8 +       /* single click to lauch applications */
9 +       char single_click;
10 +
11      int edge_resistance;
12      char attract;
13  
14 diff -Naur WindowMaker-0.63.1/src/appicon.c WindowMaker-0.63.1-p/src/appicon.c
15 --- WindowMaker-0.63.1/src/appicon.c    Wed Nov  1 16:40:16 2000
16 +++ WindowMaker-0.63.1-p/src/appicon.c  Mon Jan  8 12:15:41 2001
17 @@ -717,6 +717,7 @@
18      int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
19      int ix, iy;
20      int clickButton = event->xbutton.button;
21 +       Bool hasMoved;
22      Pixmap ghost = None;
23      Window wins[2];
24  
25 @@ -786,6 +787,7 @@
26          XClearWindow(dpy, scr->dock_shadow);
27      }
28  
29 +       hasMoved = False;
30      while (!done) {
31         WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
32                     |ButtonMotionMask|ExposureMask, &ev);
33 @@ -795,6 +797,7 @@
34             break;
35  
36          case MotionNotify:
37 +               hasMoved = True;
38             if (!grabbed) {
39                 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
40                     || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
41 @@ -925,6 +928,9 @@
42                 wArrangeIcons(scr, True);
43  
44             done = 1;
45 +               if (!hasMoved && wPreferences.single_click) {
46 +                       iconDblClick(desc, event);
47 +               }
48             break;
49         }
50      }
51 diff -Naur WindowMaker-0.63.1/src/defaults.c WindowMaker-0.63.1-p/src/defaults.c
52 --- WindowMaker-0.63.1/src/defaults.c   Sat Jan  6 22:28:02 2001
53 +++ WindowMaker-0.63.1-p/src/defaults.c Mon Jan  8 12:15:41 2001
54 @@ -547,6 +547,9 @@
55      {"DisableBlinking",        "NO",           NULL,
56            &wPreferences.dont_blink,    getBool,        NULL
57      },
58 +    {"SingleClickLaunch", "NO",                NULL,
59 +          &wPreferences.single_click,  getBool,        NULL
60 +    },
61        /* style options */
62      {"MenuStyle",      "normal",               seMenuStyles,
63         &wPreferences.menu_style, getEnum,      setMenuStyle
64 diff -Naur WindowMaker-0.63.1/src/dock.c WindowMaker-0.63.1-p/src/dock.c
65 --- WindowMaker-0.63.1/src/dock.c       Wed Nov  1 16:40:16 2000
66 +++ WindowMaker-0.63.1-p/src/dock.c     Mon Jan  8 12:15:41 2001
67 @@ -3752,7 +3752,7 @@
68  
69  
70  
71 -static void
72 +static int
73  handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
74  {
75      WScreen *scr = dock->screen_ptr;
76 @@ -3767,11 +3767,12 @@
77      int ix = aicon->xindex, iy = aicon->yindex;
78      int tmp;
79      Pixmap ghost = None;
80 -    Bool docked;
81 +    Bool docked, hasMoved;
82      int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
83      int omnipresent = aicon->omnipresent; /* this must be cached!!! */
84  
85  
86 +    hasMoved = False;
87      if (wPreferences.flags.noupdates)
88         return;
89  
90 @@ -3822,6 +3823,7 @@
91             break;
92  
93          case MotionNotify:
94 +               hasMoved = True;
95             if (!grabbed) {
96                 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
97                     || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
98 @@ -3977,7 +3979,10 @@
99  #ifdef DEBUG
100             puts("End icon move");
101  #endif
102 -           return;
103 +               if (!hasMoved) {
104 +                       return 1;
105 +               }
106 +           return 0;
107         }
108      }
109  }
110 @@ -4117,7 +4122,9 @@
111              else
112                  handleDockMove(dock, aicon, event);
113          } else
114 -           handleIconMove(dock, aicon, event);
115 +           if (handleIconMove(dock, aicon, event) != 0 &&
116 +                               wPreferences.single_click)
117 +               iconDblClick(desc, event);
118  
119      } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
120                 aicon==scr->clip_icon) {
121 diff -Naur WindowMaker-0.63.1/src/icon.c WindowMaker-0.63.1-p/src/icon.c
122 --- WindowMaker-0.63.1/src/icon.c       Sat Jan  6 22:28:02 2001
123 +++ WindowMaker-0.63.1-p/src/icon.c     Mon Jan  8 12:15:41 2001
124 @@ -874,6 +874,7 @@
125      int dx=event->xbutton.x, dy=event->xbutton.y;
126      int grabbed=0;
127      int clickButton=event->xbutton.button;
128 +       Bool hasMoved;
129  
130      if (WCHECK_STATE(WSTATE_MODAL))
131         return;
132 @@ -916,6 +917,7 @@
133         wwarning("pointer grab failed for icon move");
134  #endif
135      }
136 +       hasMoved = False;
137      while(1) {
138         WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
139                    |ButtonMotionMask|ExposureMask, &ev);
140 @@ -925,6 +927,7 @@
141             break;
142  
143          case MotionNotify:
144 +               hasMoved = True;
145             if (!grabbed) {
146                 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
147                     || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
148 @@ -962,6 +965,9 @@
149  
150             if (wPreferences.auto_arrange_icons)
151                 wArrangeIcons(wwin->screen_ptr, True);
152 +               if (!hasMoved && wPreferences.single_click) {
153 +                       miniwindowDblClick(desc, event);
154 +               }
155             return;
156             
157         }
This page took 0.033987 seconds and 4 git commands to generate.