1 diff -ur WindowMaker-0.64.0/WPrefs.app/Expert.c WindowMaker-0.64.0.new/WPrefs.app/Expert.c
2 --- WindowMaker-0.64.0/WPrefs.app/Expert.c Thu Feb 8 22:54:12 2001
3 +++ WindowMaker-0.64.0.new/WPrefs.app/Expert.c Wed Mar 21 20:00:55 2001
14 WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling"));
15 WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
16 WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
17 + WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch"));
22 panel->box = WMCreateBox(panel->parent);
23 WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
25 - for (i=0; i<7; i++) {
26 + for (i=0; i<8; i++) {
27 panel->swi[i] = WMCreateSwitchButton(panel->box);
28 WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
29 WMMoveWidget(panel->swi[i], 20, 20+i*25);
31 WMSetButtonText(panel->swi[4], _("Use Windoze style cycling"));
32 WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command"));
33 WMSetButtonText(panel->swi[6], _("Disable cycling color highlighting of icons"));
34 + WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click"));
36 WMRealizeWidget(panel->box);
37 WMMapSubwidgets(panel->box);
39 SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling");
40 SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
41 SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
42 + SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
46 diff -ur WindowMaker-0.64.0/src/WindowMaker.h WindowMaker-0.64.0.new/src/WindowMaker.h
47 --- WindowMaker-0.64.0/src/WindowMaker.h Fri Feb 9 16:56:53 2001
48 +++ WindowMaker-0.64.0.new/src/WindowMaker.h Wed Mar 21 19:59:08 2001
50 /* shading animation */
51 signed char shade_speed;
53 + /* single click to lauch applications */
59 diff -ur WindowMaker-0.64.0/src/appicon.c WindowMaker-0.64.0.new/src/appicon.c
60 --- WindowMaker-0.64.0/src/appicon.c Thu Jan 18 20:21:57 2001
61 +++ WindowMaker-0.64.0.new/src/appicon.c Wed Mar 21 19:59:08 2001
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 -ur WindowMaker-0.64.0/src/defaults.c WindowMaker-0.64.0.new/src/defaults.c
97 --- WindowMaker-0.64.0/src/defaults.c Thu Jan 18 20:21:57 2001
98 +++ WindowMaker-0.64.0.new/src/defaults.c Wed Mar 21 19:59:08 2001
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 -ur WindowMaker-0.64.0/src/dock.c WindowMaker-0.64.0.new/src/dock.c
110 --- WindowMaker-0.64.0/src/dock.c Thu Jan 18 02:33:45 2001
111 +++ WindowMaker-0.64.0.new/src/dock.c Wed Mar 21 19:59:08 2001
112 @@ -3752,7 +3752,7 @@
118 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
120 WScreen *scr = dock->screen_ptr;
121 @@ -3767,11 +3767,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 @@ -3822,6 +3822,7 @@
141 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
142 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
143 @@ -3977,7 +3978,10 @@
145 puts("End icon move");
155 @@ -4117,7 +4121,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 -ur WindowMaker-0.64.0/src/icon.c WindowMaker-0.64.0.new/src/icon.c
167 --- WindowMaker-0.64.0/src/icon.c Sat Jan 6 19:54:16 2001
168 +++ WindowMaker-0.64.0.new/src/icon.c Wed Mar 21 19:59:08 2001
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);