1 diff -urN WindowMaker-0.62.1/WPrefs.app/Expert.c WindowMaker-0.62.1.patched/WPrefs.app/Expert.c
2 --- WindowMaker-0.62.1/WPrefs.app/Expert.c Fri Sep 17 17:03:54 1999
3 +++ WindowMaker-0.62.1.patched/WPrefs.app/Expert.c Wed Aug 16 20:43:48 2000
14 WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders"));
15 WMSetButtonSelected(panel->swi[4], GetBoolForKey("DisableBlinking"));
16 WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
17 + WMSetButtonSelected(panel->swi[6], GetBoolForKey("SingleClickLaunch"));
22 WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
23 WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
25 - for (i=0; i<6; i++) {
26 + for (i=0; i<7; i++) {
27 panel->swi[i] = WMCreateSwitchButton(panel->frame);
28 WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
29 WMMoveWidget(panel->swi[i], 20, 20+i*25);
31 WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects"));
32 WMSetButtonText(panel->swi[4], _("Disable cycling color highlighting of icons."));
33 WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command."));
34 + WMSetButtonText(panel->swi[6], _("Launch applications and restore windows with a single click"));
36 WMRealizeWidget(panel->frame);
37 WMMapSubwidgets(panel->frame);
39 SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders");
40 SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DisableBlinking");
41 SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
42 + SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "SingleClickLaunch");
46 diff -urN WindowMaker-0.62.1/src/WindowMaker.h WindowMaker-0.62.1.patched/src/WindowMaker.h
47 --- WindowMaker-0.62.1/src/WindowMaker.h Tue Mar 28 22:23:38 2000
48 +++ WindowMaker-0.62.1.patched/src/WindowMaker.h Wed Aug 16 20:37:00 2000
50 /* shading animation */
51 signed char shade_speed;
53 + /* single click to lauch applications */
59 diff -urN WindowMaker-0.62.1/src/appicon.c WindowMaker-0.62.1.patched/src/appicon.c
60 --- WindowMaker-0.62.1/src/appicon.c Wed Mar 29 21:52:10 2000
61 +++ WindowMaker-0.62.1.patched/src/appicon.c Wed Aug 16 20:37:00 2000
63 int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
65 int clickButton = event->xbutton.button;
71 XClearWindow(dpy, scr->dock_shadow);
76 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
77 |ButtonMotionMask|ExposureMask, &ev);
84 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
85 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
87 wArrangeIcons(scr, True);
90 + if (!hasMoved && wPreferences.single_click) {
91 + iconDblClick(desc, event);
96 diff -urN WindowMaker-0.62.1/src/defaults.c WindowMaker-0.62.1.patched/src/defaults.c
97 --- WindowMaker-0.62.1/src/defaults.c Tue Mar 28 22:58:25 2000
98 +++ WindowMaker-0.62.1.patched/src/defaults.c Wed Aug 16 20:37:58 2000
100 {"DisableBlinking", "NO", NULL,
101 &wPreferences.dont_blink, getBool, NULL
103 + {"SingleClickLaunch", "NO", NULL,
104 + &wPreferences.single_click, getBool, NULL
107 {"MenuStyle", "normal", seMenuStyles,
108 &wPreferences.menu_style, getEnum, setMenuStyle
109 diff -urN WindowMaker-0.62.1/src/dock.c WindowMaker-0.62.1.patched/src/dock.c
110 --- WindowMaker-0.62.1/src/dock.c Wed Mar 29 21:52:10 2000
111 +++ WindowMaker-0.62.1.patched/src/dock.c Wed Aug 16 20:40:15 2000
112 @@ -3750,7 +3750,7 @@
118 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
120 WScreen *scr = dock->screen_ptr;
121 @@ -3765,11 +3765,11 @@
122 int ix = aicon->xindex, iy = aicon->yindex;
126 + Bool docked, hasMoved;
127 int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
128 int omnipresent = aicon->omnipresent; /* this must be cached!!! */
132 if (wPreferences.flags.noupdates)
135 @@ -3820,6 +3820,7 @@
141 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
142 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
143 @@ -3975,7 +3976,10 @@
145 puts("End icon move");
155 @@ -4115,7 +4119,9 @@
157 handleDockMove(dock, aicon, event);
159 - handleIconMove(dock, aicon, event);
160 + if (handleIconMove(dock, aicon, event) != 0 &&
161 + wPreferences.single_click)
162 + iconDblClick(desc, event);
164 } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
165 aicon==scr->clip_icon) {
166 diff -urN WindowMaker-0.62.1/src/icon.c WindowMaker-0.62.1.patched/src/icon.c
167 --- WindowMaker-0.62.1/src/icon.c Thu Jan 20 06:51:44 2000
168 +++ WindowMaker-0.62.1.patched/src/icon.c Wed Aug 16 20:37:00 2000
170 int dx=event->xbutton.x, dy=event->xbutton.y;
172 int clickButton=event->xbutton.button;
175 if (WCHECK_STATE(WSTATE_MODAL))
178 wwarning("pointer grab failed for icon move");
183 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
184 |ButtonMotionMask|ExposureMask, &ev);
191 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
192 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
195 if (wPreferences.auto_arrange_icons)
196 wArrangeIcons(wwin->screen_ptr, True);
197 + if (!hasMoved && wPreferences.single_click) {
198 + miniwindowDblClick(desc, event);