1 diff -Nru WindowMaker-0.63.1/WPrefs.app/Expert.c WindowMaker-0.63.1.new/WPrefs.app/Expert.c
2 --- WindowMaker-0.63.1/WPrefs.app/Expert.c Sat Jan 6 23:43:21 2001
3 +++ WindowMaker-0.63.1.new/WPrefs.app/Expert.c Sun Jan 7 23:06:09 2001
5 WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling"));
6 WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
7 WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
8 + WMSetButtonSelected(panel->swi[6], GetBoolForKey("SingleClickLaunch"));
13 WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
14 WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
16 - for (i=0; i<7; i++) {
17 + for (i=0; i<8; i++) {
18 panel->swi[i] = WMCreateSwitchButton(panel->frame);
19 WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
20 WMMoveWidget(panel->swi[i], 20, 20+i*25);
22 WMSetButtonText(panel->swi[4], _("Use Windoze style cycling"));
23 WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command"));
24 WMSetButtonText(panel->swi[6], _("Disable cycling color highlighting of icons"));
25 + WMSetButtonText(panel->swi[6], _("Launch applications and restore windows with a single click"));
27 WMRealizeWidget(panel->frame);
28 WMMapSubwidgets(panel->frame);
30 SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling");
31 SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
32 SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
33 + SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "SingleClickLaunch");
37 diff -Nru WindowMaker-0.63.1/src/WindowMaker.h WindowMaker-0.63.1.new/src/WindowMaker.h
38 --- WindowMaker-0.63.1/src/WindowMaker.h Fri Nov 17 03:10:32 2000
39 +++ WindowMaker-0.63.1.new/src/WindowMaker.h Sun Jan 7 23:02:54 2001
41 /* shading animation */
42 signed char shade_speed;
44 + /* single click to lauch applications */
50 diff -Nru WindowMaker-0.63.1/src/appicon.c WindowMaker-0.63.1.new/src/appicon.c
51 --- WindowMaker-0.63.1/src/appicon.c Wed Nov 1 16:40:16 2000
52 +++ WindowMaker-0.63.1.new/src/appicon.c Sun Jan 7 23:02:54 2001
54 int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
56 int clickButton = event->xbutton.button;
62 XClearWindow(dpy, scr->dock_shadow);
67 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
68 |ButtonMotionMask|ExposureMask, &ev);
75 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
76 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
78 wArrangeIcons(scr, True);
81 + if (!hasMoved && wPreferences.single_click) {
82 + iconDblClick(desc, event);
87 diff -Nru WindowMaker-0.63.1/src/defaults.c WindowMaker-0.63.1.new/src/defaults.c
88 --- WindowMaker-0.63.1/src/defaults.c Sat Jan 6 22:28:02 2001
89 +++ WindowMaker-0.63.1.new/src/defaults.c Sun Jan 7 23:02:54 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 -Nru WindowMaker-0.63.1/src/dock.c WindowMaker-0.63.1.new/src/dock.c
101 --- WindowMaker-0.63.1/src/dock.c Wed Nov 1 16:40:16 2000
102 +++ WindowMaker-0.63.1.new/src/dock.c Sun Jan 7 23:02:54 2001
103 @@ -3752,7 +3752,7 @@
109 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
111 WScreen *scr = dock->screen_ptr;
112 @@ -3767,11 +3767,12 @@
113 int ix = aicon->xindex, iy = aicon->yindex;
117 + Bool docked, hasMoved;
118 int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
119 int omnipresent = aicon->omnipresent; /* this must be cached!!! */
123 if (wPreferences.flags.noupdates)
126 @@ -3822,6 +3823,7 @@
132 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
133 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
134 @@ -3977,7 +3979,10 @@
136 puts("End icon move");
146 @@ -4117,7 +4122,9 @@
148 handleDockMove(dock, aicon, event);
150 - handleIconMove(dock, aicon, event);
151 + if (handleIconMove(dock, aicon, event) != 0 &&
152 + wPreferences.single_click)
153 + iconDblClick(desc, event);
155 } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
156 aicon==scr->clip_icon) {
157 diff -Nru WindowMaker-0.63.1/src/icon.c WindowMaker-0.63.1.new/src/icon.c
158 --- WindowMaker-0.63.1/src/icon.c Sat Jan 6 22:28:02 2001
159 +++ WindowMaker-0.63.1.new/src/icon.c Sun Jan 7 23:02:54 2001
161 int dx=event->xbutton.x, dy=event->xbutton.y;
163 int clickButton=event->xbutton.button;
166 if (WCHECK_STATE(WSTATE_MODAL))
169 wwarning("pointer grab failed for icon move");
174 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
175 |ButtonMotionMask|ExposureMask, &ev);
182 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
183 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
186 if (wPreferences.auto_arrange_icons)
187 wArrangeIcons(wwin->screen_ptr, True);
188 + if (!hasMoved && wPreferences.single_click) {
189 + miniwindowDblClick(desc, event);