]>
Commit | Line | Data |
---|---|---|
5a1d6215 | 1 | --- WindowMaker-0.61.0/WPrefs.app/Expert.c Sat Sep 18 02:11:58 1999 |
2 | +++ WindowMaker-0.61.0.singleclick/WPrefs.app/Expert.c Sun Oct 10 16:49:18 1999 | |
3 | @@ -53,6 +53,7 @@ | |
149d7ea9 JR |
4 | WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders")); |
5 | WMSetButtonSelected(panel->swi[4], GetBoolForKey("DisableBlinking")); | |
5a1d6215 | 6 | WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill")); |
7 | + WMSetButtonSelected(panel->swi[6], GetBoolForKey("SingleClickLaunch")); | |
149d7ea9 JR |
8 | } |
9 | ||
10 | ||
5a1d6215 | 11 | @@ -66,7 +67,7 @@ |
149d7ea9 JR |
12 | WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT); |
13 | WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP); | |
14 | ||
5a1d6215 | 15 | - for (i=0; i<6; i++) { |
16 | + for (i=0; i<7; i++) { | |
149d7ea9 JR |
17 | panel->swi[i] = WMCreateSwitchButton(panel->frame); |
18 | WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25); | |
19 | WMMoveWidget(panel->swi[i], 20, 20+i*25); | |
5a1d6215 | 20 | @@ -78,6 +79,7 @@ |
149d7ea9 JR |
21 | WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects")); |
22 | WMSetButtonText(panel->swi[4], _("Disable cycling color highlighting of icons.")); | |
5a1d6215 | 23 | WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command.")); |
24 | + WMSetButtonText(panel->swi[6], _("Launch applications and restore windows with a single click")); | |
149d7ea9 JR |
25 | |
26 | WMRealizeWidget(panel->frame); | |
27 | WMMapSubwidgets(panel->frame); | |
5a1d6215 | 28 | @@ -99,6 +101,7 @@ |
149d7ea9 JR |
29 | SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders"); |
30 | SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DisableBlinking"); | |
5a1d6215 | 31 | SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill"); |
32 | + SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "SingleClickLaunch"); | |
149d7ea9 JR |
33 | } |
34 | ||
35 | ||
5a1d6215 | 36 | --- WindowMaker-0.61.0/src/WindowMaker.h Fri Sep 17 17:42:07 1999 |
37 | +++ WindowMaker-0.61.0.singleclick/src/WindowMaker.h Sun Oct 10 16:51:11 1999 | |
38 | @@ -400,6 +400,9 @@ | |
149d7ea9 JR |
39 | /* shading animation */ |
40 | char shade_speed; | |
41 | ||
42 | + /* single click to lauch applications */ | |
43 | + char single_click; | |
44 | + | |
45 | int edge_resistance; | |
5a1d6215 | 46 | char attract; |
149d7ea9 | 47 | |
5a1d6215 | 48 | --- WindowMaker-0.61.0/src/appicon.c Thu Sep 16 05:22:53 1999 |
49 | +++ WindowMaker-0.61.0.singleclick/src/appicon.c Sun Oct 10 16:51:11 1999 | |
50 | @@ -739,6 +739,7 @@ | |
149d7ea9 JR |
51 | int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0; |
52 | int ix, iy; | |
53 | int clickButton = event->xbutton.button; | |
54 | + Bool hasMoved; | |
55 | Pixmap ghost = None; | |
56 | Window wins[2]; | |
57 | ||
5a1d6215 | 58 | @@ -800,6 +801,7 @@ |
149d7ea9 JR |
59 | XClearWindow(dpy, scr->dock_shadow); |
60 | } | |
61 | ||
62 | + hasMoved = False; | |
63 | while (!done) { | |
64 | WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask | |
65 | |ButtonMotionMask|ExposureMask, &ev); | |
5a1d6215 | 66 | @@ -809,6 +811,7 @@ |
149d7ea9 JR |
67 | break; |
68 | ||
69 | case MotionNotify: | |
70 | + hasMoved = True; | |
71 | if (!grabbed) { | |
72 | if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD | |
73 | || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) { | |
5a1d6215 | 74 | @@ -935,6 +938,9 @@ |
149d7ea9 JR |
75 | wArrangeIcons(scr, True); |
76 | ||
77 | done = 1; | |
78 | + if (!hasMoved && wPreferences.single_click) { | |
79 | + iconDblClick(desc, event); | |
80 | + } | |
81 | break; | |
82 | } | |
83 | } | |
5a1d6215 | 84 | --- WindowMaker-0.61.0/src/defaults.c Fri Sep 17 17:42:09 1999 |
85 | +++ WindowMaker-0.61.0.singleclick/src/defaults.c Sun Oct 10 16:51:11 1999 | |
86 | @@ -503,6 +503,9 @@ | |
149d7ea9 JR |
87 | {"DisableBlinking", "NO", NULL, |
88 | &wPreferences.dont_blink, getBool, NULL | |
89 | }, | |
90 | + {"SingleClickLaunch", "NO", NULL, | |
91 | + &wPreferences.single_click, getBool, NULL | |
92 | + }, | |
93 | #ifdef WEENDOZE_CYCLE | |
94 | {"WindozeCycling","NO", NULL, | |
95 | &wPreferences.windoze_cycling, getBool, NULL | |
5a1d6215 | 96 | --- WindowMaker-0.61.0/src/dock.c Thu Sep 16 05:22:53 1999 |
97 | +++ WindowMaker-0.61.0.singleclick/src/dock.c Sun Oct 10 16:51:11 1999 | |
98 | @@ -3806,7 +3806,7 @@ | |
149d7ea9 JR |
99 | |
100 | ||
101 | ||
102 | -static void | |
103 | +static int | |
104 | handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event) | |
105 | { | |
106 | WScreen *scr = dock->screen_ptr; | |
5a1d6215 | 107 | @@ -3821,11 +3821,12 @@ |
149d7ea9 JR |
108 | int ix = aicon->xindex, iy = aicon->yindex; |
109 | int tmp; | |
110 | Pixmap ghost = None; | |
111 | - Bool docked; | |
112 | + Bool docked, hasMoved; | |
113 | int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */ | |
114 | int omnipresent = aicon->omnipresent; /* this must be cached!!! */ | |
115 | ||
116 | ||
117 | + hasMoved = False; | |
118 | if (wPreferences.flags.noupdates) | |
119 | return; | |
120 | ||
5a1d6215 | 121 | @@ -3876,6 +3877,7 @@ |
149d7ea9 JR |
122 | break; |
123 | ||
124 | case MotionNotify: | |
125 | + hasMoved = True; | |
126 | if (!grabbed) { | |
127 | if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD | |
128 | || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) { | |
5a1d6215 | 129 | @@ -4018,7 +4020,10 @@ |
149d7ea9 JR |
130 | #ifdef DEBUG |
131 | puts("End icon move"); | |
132 | #endif | |
133 | - return; | |
134 | + if (!hasMoved) { | |
135 | + return 1; | |
136 | + } | |
137 | + return 0; | |
138 | } | |
139 | } | |
140 | } | |
5a1d6215 | 141 | @@ -4158,7 +4163,9 @@ |
149d7ea9 JR |
142 | else |
143 | handleDockMove(dock, aicon, event); | |
144 | } else | |
145 | - handleIconMove(dock, aicon, event); | |
146 | + if (handleIconMove(dock, aicon, event) != 0 && | |
147 | + wPreferences.single_click) | |
148 | + iconDblClick(desc, event); | |
149 | ||
150 | } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP && | |
151 | aicon==scr->clip_icon) { | |
5a1d6215 | 152 | --- WindowMaker-0.61.0/src/icon.c Sun May 30 07:02:56 1999 |
153 | +++ WindowMaker-0.61.0.singleclick/src/icon.c Sun Oct 10 16:51:11 1999 | |
149d7ea9 JR |
154 | @@ -863,6 +863,7 @@ |
155 | int dx=event->xbutton.x, dy=event->xbutton.y; | |
156 | int grabbed=0; | |
157 | int clickButton=event->xbutton.button; | |
158 | + Bool hasMoved; | |
159 | ||
160 | if (WCHECK_STATE(WSTATE_MODAL)) | |
161 | return; | |
162 | @@ -905,6 +906,7 @@ | |
163 | wwarning("pointer grab failed for icon move"); | |
164 | #endif | |
165 | } | |
166 | + hasMoved = False; | |
167 | while(1) { | |
168 | WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask | |
169 | |ButtonMotionMask|ExposureMask, &ev); | |
170 | @@ -914,6 +916,7 @@ | |
171 | break; | |
172 | ||
173 | case MotionNotify: | |
174 | + hasMoved = True; | |
175 | if (!grabbed) { | |
176 | if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD | |
177 | || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) { | |
178 | @@ -951,6 +954,9 @@ | |
179 | ||
180 | if (wPreferences.auto_arrange_icons) | |
181 | wArrangeIcons(wwin->screen_ptr, True); | |
182 | + if (!hasMoved && wPreferences.single_click) { | |
183 | + miniwindowDblClick(desc, event); | |
184 | + } | |
185 | return; | |
186 | ||
187 | } |