]>
Commit | Line | Data |
---|---|---|
8a5e3c0d | 1 | --- WindowMaker-0.65.1/WPrefs.app/Expert.c.orig Mon Jun 4 19:47:32 2001 |
2 | +++ WindowMaker-0.65.1/WPrefs.app/Expert.c Thu Jul 26 12:09:03 2001 | |
43612bfa JR |
3 | @@ -33,7 +33,7 @@ |
4 | ||
5 | WMWidget *parent; | |
6 | ||
7 | - WMButton *swi[8]; | |
8 | + WMButton *swi[9]; | |
9 | ||
10 | } _Panel; | |
11 | ||
12 | @@ -54,6 +54,7 @@ | |
13 | WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling")); | |
14 | WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill")); | |
15 | WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking")); | |
16 | + WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch")); | |
17 | } | |
18 | ||
19 | ||
20 | @@ -66,7 +67,7 @@ | |
21 | panel->box = WMCreateBox(panel->parent); | |
ffba6295 | 22 | WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2); |
43612bfa JR |
23 | |
24 | - for (i=0; i<7; i++) { | |
25 | + for (i=0; i<8; i++) { | |
26 | panel->swi[i] = WMCreateSwitchButton(panel->box); | |
27 | WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25); | |
28 | WMMoveWidget(panel->swi[i], 20, 20+i*25); | |
29 | @@ -79,6 +80,7 @@ | |
ffba6295 | 30 | WMSetButtonText(panel->swi[4], _("Use Windoze style cycling.")); |
31 | WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command.")); | |
8a5e3c0d | 32 | WMSetButtonText(panel->swi[6], _("Disable selection animation for selected icons.")); |
d2fabf5b | 33 | + WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click")); |
43612bfa JR |
34 | |
35 | WMRealizeWidget(panel->box); | |
36 | WMMapSubwidgets(panel->box); | |
37 | @@ -101,6 +103,7 @@ | |
38 | SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling"); | |
39 | SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill"); | |
40 | SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking"); | |
41 | + SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch"); | |
42 | } | |
43 | ||
44 | ||
45 | diff -ur WindowMaker-0.64.0/src/WindowMaker.h WindowMaker-0.64.0.new/src/WindowMaker.h | |
46 | --- WindowMaker-0.64.0/src/WindowMaker.h Fri Feb 9 16:56:53 2001 | |
47 | +++ WindowMaker-0.64.0.new/src/WindowMaker.h Wed Mar 21 19:59:08 2001 | |
48 | @@ -435,6 +435,9 @@ | |
149d7ea9 | 49 | /* shading animation */ |
dab91712 | 50 | signed char shade_speed; |
149d7ea9 JR |
51 | |
52 | + /* single click to lauch applications */ | |
53 | + char single_click; | |
54 | + | |
55 | int edge_resistance; | |
5a1d6215 | 56 | char attract; |
149d7ea9 | 57 | |
43612bfa JR |
58 | diff -ur WindowMaker-0.64.0/src/appicon.c WindowMaker-0.64.0.new/src/appicon.c |
59 | --- WindowMaker-0.64.0/src/appicon.c Thu Jan 18 20:21:57 2001 | |
60 | +++ WindowMaker-0.64.0.new/src/appicon.c Wed Mar 21 19:59:08 2001 | |
ffba6295 | 61 | @@ -704,6 +704,7 @@ |
149d7ea9 JR |
62 | int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0; |
63 | int ix, iy; | |
64 | int clickButton = event->xbutton.button; | |
ffba6295 | 65 | + Bool hasMoved; |
149d7ea9 JR |
66 | Pixmap ghost = None; |
67 | Window wins[2]; | |
ffba6295 | 68 | Bool movingSingle = False; |
69 | @@ -785,6 +786,7 @@ | |
149d7ea9 JR |
70 | XClearWindow(dpy, scr->dock_shadow); |
71 | } | |
ffba6295 | 72 | |
73 | + hasMoved = False; | |
149d7ea9 JR |
74 | while (!done) { |
75 | WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask | |
76 | |ButtonMotionMask|ExposureMask, &ev); | |
ffba6295 | 77 | @@ -794,6 +796,7 @@ |
149d7ea9 JR |
78 | break; |
79 | ||
80 | case MotionNotify: | |
81 | + hasMoved = True; | |
82 | if (!grabbed) { | |
83 | if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD | |
84 | || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) { | |
ffba6295 | 85 | @@ -943,6 +946,9 @@ |
149d7ea9 JR |
86 | wArrangeIcons(scr, True); |
87 | ||
88 | done = 1; | |
89 | + if (!hasMoved && wPreferences.single_click) { | |
90 | + iconDblClick(desc, event); | |
91 | + } | |
92 | break; | |
93 | } | |
94 | } | |
43612bfa JR |
95 | diff -ur WindowMaker-0.64.0/src/defaults.c WindowMaker-0.64.0.new/src/defaults.c |
96 | --- WindowMaker-0.64.0/src/defaults.c Thu Jan 18 20:21:57 2001 | |
97 | +++ WindowMaker-0.64.0.new/src/defaults.c Wed Mar 21 19:59:08 2001 | |
260b62b4 | 98 | @@ -547,6 +547,9 @@ |
149d7ea9 JR |
99 | {"DisableBlinking", "NO", NULL, |
100 | &wPreferences.dont_blink, getBool, NULL | |
101 | }, | |
dab91712 | 102 | + {"SingleClickLaunch", "NO", NULL, |
43612bfa | 103 | + &wPreferences.single_click, getBool, NULL |
dab91712 | 104 | + }, |
105 | /* style options */ | |
106 | {"MenuStyle", "normal", seMenuStyles, | |
107 | &wPreferences.menu_style, getEnum, setMenuStyle | |
43612bfa JR |
108 | diff -ur WindowMaker-0.64.0/src/dock.c WindowMaker-0.64.0.new/src/dock.c |
109 | --- WindowMaker-0.64.0/src/dock.c Thu Jan 18 02:33:45 2001 | |
110 | +++ WindowMaker-0.64.0.new/src/dock.c Wed Mar 21 19:59:08 2001 | |
260b62b4 | 111 | @@ -3752,7 +3752,7 @@ |
149d7ea9 JR |
112 | |
113 | ||
114 | ||
115 | -static void | |
116 | +static int | |
117 | handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event) | |
118 | { | |
119 | WScreen *scr = dock->screen_ptr; | |
43612bfa | 120 | @@ -3767,11 +3767,11 @@ |
149d7ea9 JR |
121 | int ix = aicon->xindex, iy = aicon->yindex; |
122 | int tmp; | |
123 | Pixmap ghost = None; | |
124 | - Bool docked; | |
125 | + Bool docked, hasMoved; | |
126 | int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */ | |
127 | int omnipresent = aicon->omnipresent; /* this must be cached!!! */ | |
128 | ||
43612bfa | 129 | - |
149d7ea9 JR |
130 | + hasMoved = False; |
131 | if (wPreferences.flags.noupdates) | |
132 | return; | |
133 | ||
43612bfa | 134 | @@ -3822,6 +3822,7 @@ |
149d7ea9 JR |
135 | break; |
136 | ||
137 | case MotionNotify: | |
138 | + hasMoved = True; | |
139 | if (!grabbed) { | |
140 | if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD | |
141 | || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) { | |
43612bfa | 142 | @@ -3977,7 +3978,10 @@ |
149d7ea9 JR |
143 | #ifdef DEBUG |
144 | puts("End icon move"); | |
145 | #endif | |
146 | - return; | |
147 | + if (!hasMoved) { | |
148 | + return 1; | |
149 | + } | |
150 | + return 0; | |
151 | } | |
152 | } | |
153 | } | |
43612bfa | 154 | @@ -4117,7 +4121,9 @@ |
149d7ea9 JR |
155 | else |
156 | handleDockMove(dock, aicon, event); | |
157 | } else | |
158 | - handleIconMove(dock, aicon, event); | |
43612bfa JR |
159 | + if (handleIconMove(dock, aicon, event) != 0 && |
160 | + wPreferences.single_click) | |
161 | + iconDblClick(desc, event); | |
149d7ea9 JR |
162 | |
163 | } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP && | |
164 | aicon==scr->clip_icon) { | |
43612bfa JR |
165 | diff -ur WindowMaker-0.64.0/src/icon.c WindowMaker-0.64.0.new/src/icon.c |
166 | --- WindowMaker-0.64.0/src/icon.c Sat Jan 6 19:54:16 2001 | |
167 | +++ WindowMaker-0.64.0.new/src/icon.c Wed Mar 21 19:59:08 2001 | |
dab91712 | 168 | @@ -874,6 +874,7 @@ |
149d7ea9 JR |
169 | int dx=event->xbutton.x, dy=event->xbutton.y; |
170 | int grabbed=0; | |
171 | int clickButton=event->xbutton.button; | |
172 | + Bool hasMoved; | |
173 | ||
174 | if (WCHECK_STATE(WSTATE_MODAL)) | |
175 | return; | |
dab91712 | 176 | @@ -916,6 +917,7 @@ |
149d7ea9 JR |
177 | wwarning("pointer grab failed for icon move"); |
178 | #endif | |
179 | } | |
180 | + hasMoved = False; | |
181 | while(1) { | |
182 | WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask | |
183 | |ButtonMotionMask|ExposureMask, &ev); | |
dab91712 | 184 | @@ -925,6 +927,7 @@ |
149d7ea9 JR |
185 | break; |
186 | ||
187 | case MotionNotify: | |
188 | + hasMoved = True; | |
189 | if (!grabbed) { | |
190 | if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD | |
191 | || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) { | |
dab91712 | 192 | @@ -962,6 +965,9 @@ |
149d7ea9 JR |
193 | |
194 | if (wPreferences.auto_arrange_icons) | |
195 | wArrangeIcons(wwin->screen_ptr, True); | |
196 | + if (!hasMoved && wPreferences.single_click) { | |
197 | + miniwindowDblClick(desc, event); | |
198 | + } | |
199 | return; | |
200 | ||
201 | } |