1 diff -urN WindowMaker-0.60.0.orig/WPrefs.app/Expert.c WindowMaker-0.60.0/WPrefs.app/Expert.c
2 --- WindowMaker-0.60.0.orig/WPrefs.app/Expert.c Sun Apr 25 21:47:28 1999
3 +++ WindowMaker-0.60.0/WPrefs.app/Expert.c Sun Jul 11 01:29:12 1999
14 WMSetButtonSelected(panel->swi[2], GetBoolForKey("SaveSessionOnExit"));
15 WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders"));
16 WMSetButtonSelected(panel->swi[4], GetBoolForKey("DisableBlinking"));
17 + WMSetButtonSelected(panel->swi[5], GetBoolForKey("SingleClickLaunch"));
22 WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
23 WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
25 - for (i=0; i<5; i++) {
26 + for (i=0; i<6; 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[2], _("Automatically save session when exiting WindowMaker"));
32 WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects"));
33 WMSetButtonText(panel->swi[4], _("Disable cycling color highlighting of icons."));
34 + WMSetButtonText(panel->swi[5], _("Launch applications and restore windows with a single click"));
36 WMRealizeWidget(panel->frame);
37 WMMapSubwidgets(panel->frame);
39 SetBoolForKey(WMGetButtonSelected(panel->swi[2]), "SaveSessionOnExit");
40 SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders");
41 SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DisableBlinking");
42 + SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "SingleClickLaunch");
46 diff -urN WindowMaker-0.60.0.orig/src/WindowMaker.h WindowMaker-0.60.0/src/WindowMaker.h
47 --- WindowMaker-0.60.0.orig/src/WindowMaker.h Sun May 30 23:25:20 1999
48 +++ WindowMaker-0.60.0/src/WindowMaker.h Sun Jul 11 01:29:12 1999
50 /* shading animation */
53 + /* single click to lauch applications */
59 diff -urN WindowMaker-0.60.0.orig/src/appicon.c WindowMaker-0.60.0/src/appicon.c
60 --- WindowMaker-0.60.0.orig/src/appicon.c Tue Jun 1 12:34:40 1999
61 +++ WindowMaker-0.60.0/src/appicon.c Sun Jul 11 01:29:12 1999
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.60.0.orig/src/defaults.c WindowMaker-0.60.0/src/defaults.c
97 --- WindowMaker-0.60.0.orig/src/defaults.c Tue Jun 1 12:34:40 1999
98 +++ WindowMaker-0.60.0/src/defaults.c Sun Jul 11 01:29:12 1999
100 {"DisableBlinking", "NO", NULL,
101 &wPreferences.dont_blink, getBool, NULL
103 + {"SingleClickLaunch", "NO", NULL,
104 + &wPreferences.single_click, getBool, NULL
106 #ifdef WEENDOZE_CYCLE
107 {"WindozeCycling","NO", NULL,
108 &wPreferences.windoze_cycling, getBool, NULL
109 diff -urN WindowMaker-0.60.0.orig/src/dock.c WindowMaker-0.60.0/src/dock.c
110 --- WindowMaker-0.60.0.orig/src/dock.c Thu Jun 3 13:29:05 1999
111 +++ WindowMaker-0.60.0/src/dock.c Sun Jul 11 01:34:50 1999
112 @@ -3746,7 +3746,7 @@
118 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
120 WScreen *scr = dock->screen_ptr;
121 @@ -3761,11 +3761,12 @@
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 @@ -3816,6 +3817,7 @@
141 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
142 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
143 @@ -3958,7 +3960,10 @@
145 puts("End icon move");
155 @@ -4098,7 +4103,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.60.0.orig/src/icon.c WindowMaker-0.60.0/src/icon.c
167 --- WindowMaker-0.60.0.orig/src/icon.c Sun May 30 23:25:21 1999
168 +++ WindowMaker-0.60.0/src/icon.c Sun Jul 11 01:29:13 1999
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);