1 diff -ur WindowMaker-0.65.1/WPrefs.app/Expert.c WindowMaker-0.65.1-patched/WPrefs.app/Expert.c
2 --- WindowMaker-0.65.1/WPrefs.app/Expert.c Mon Jun 4 13:47:32 2001
3 +++ WindowMaker-0.65.1-patched/WPrefs.app/Expert.c Sat Aug 18 03:53:25 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 WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
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 selection animation for selected 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.65.1/src/WindowMaker.h WindowMaker-0.65.1-patched/src/WindowMaker.h
47 --- WindowMaker-0.65.1/src/WindowMaker.h Wed Jun 6 15:07:42 2001
48 +++ WindowMaker-0.65.1-patched/src/WindowMaker.h Sat Aug 18 03:47:36 2001
50 /* shading animation */
51 signed char shade_speed;
53 + /* single click to lauch applications */
59 diff -ur WindowMaker-0.65.1/src/appicon.c WindowMaker-0.65.1-patched/src/appicon.c
60 --- WindowMaker-0.65.1/src/appicon.c Mon Jul 23 14:32:46 2001
61 +++ WindowMaker-0.65.1-patched/src/appicon.c Sat Aug 18 03:47:36 2001
63 int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
65 int clickButton = event->xbutton.button;
66 + Bool hasMoved = False;
69 Bool movingSingle = False;
76 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
77 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
80 if (wPreferences.auto_arrange_icons)
81 wArrangeIcons(scr, True);
82 + if (!hasMoved && wPreferences.single_click)
83 + iconDblClick(desc, event);
87 diff -ur WindowMaker-0.65.1/src/defaults.c WindowMaker-0.65.1-patched/src/defaults.c
88 --- WindowMaker-0.65.1/src/defaults.c Mon Jul 23 14:31:36 2001
89 +++ WindowMaker-0.65.1-patched/src/defaults.c Sat Aug 18 03:47:36 2001
91 {"DisableBlinking", "NO", NULL,
92 &wPreferences.dont_blink, getBool, NULL
94 + {"SingleClickLaunch", "NO", NULL,
95 + &wPreferences.single_click, getBool, NULL
98 {"MenuStyle", "normal", seMenuStyles,
99 &wPreferences.menu_style, getEnum, setMenuStyle
100 diff -ur WindowMaker-0.65.1/src/dock.c WindowMaker-0.65.1-patched/src/dock.c
101 --- WindowMaker-0.65.1/src/dock.c Mon Jul 23 14:37:25 2001
102 +++ WindowMaker-0.65.1-patched/src/dock.c Sat Aug 18 03:47:36 2001
103 @@ -3690,7 +3690,7 @@
109 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
111 WScreen *scr = dock->screen_ptr;
112 @@ -3706,6 +3706,7 @@
116 + Bool hasMoved = False;
117 int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
118 int omnipresent = aicon->omnipresent; /* this must be cached!!! */
120 @@ -3760,6 +3761,7 @@
126 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
127 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
128 @@ -3909,7 +3911,7 @@
130 puts("End icon move");
137 @@ -4048,8 +4050,11 @@
138 handleClipChangeWorkspace(scr, event);
140 handleDockMove(dock, aicon, event);
142 - handleIconMove(dock, aicon, event);
144 + Bool hasMoved = handleIconMove(dock, aicon, event);
145 + if (!hasMoved && wPreferences.single_click)
146 + iconDblClick(desc, event);
149 } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
150 aicon==scr->clip_icon) {
151 diff -ur WindowMaker-0.65.1/src/icon.c WindowMaker-0.65.1-patched/src/icon.c
152 --- WindowMaker-0.65.1/src/icon.c Mon Jul 23 14:20:27 2001
153 +++ WindowMaker-0.65.1-patched/src/icon.c Sat Aug 18 03:47:36 2001
155 int dx=event->xbutton.x, dy=event->xbutton.y;
157 int clickButton=event->xbutton.button;
158 + Bool hasMoved = False;
160 if (WCHECK_STATE(WSTATE_MODAL))
168 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
169 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
172 if (wPreferences.auto_arrange_icons)
173 wArrangeIcons(wwin->screen_ptr, True);
174 + if (!hasMoved && wPreferences.single_click)
175 + miniwindowDblClick(desc, event);