1 diff -urN wm-a/WPrefs.app/Expert.c wm-c/WPrefs.app/Expert.c
2 --- wm-a/WPrefs.app/Expert.c 2003-01-16 18:30:47.000000000 -0500
3 +++ wm-c/WPrefs.app/Expert.c 2003-05-19 12:50:17.000000000 -0400
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"));
18 if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
19 - WMSetButtonSelected(panel->swi[7], GetBoolForKey("AntialiasedText"));
20 + WMSetButtonSelected(panel->swi[8], GetBoolForKey("AntialiasedText"));
25 panel->box = WMCreateBox(panel->parent);
26 WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
28 - for (i=0; i<8; i++) {
29 + for (i=0; i<9; i++) {
30 panel->swi[i] = WMCreateSwitchButton(panel->box);
31 WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
32 - WMMoveWidget(panel->swi[i], 20, 20+i*25);
33 + WMMoveWidget(panel->swi[i], 20, 5+i*25);
36 WMSetButtonText(panel->swi[0], _("Disable miniwindows (icons for miniaturized windows). For use with KDE/GNOME."));
38 WMSetButtonText(panel->swi[4], _("Use Windoze style cycling."));
39 WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command."));
40 WMSetButtonText(panel->swi[6], _("Disable selection animation for selected icons."));
41 - WMSetButtonText(panel->swi[7], _("Smooth font edges (needs restart)."));
43 + WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click"));
44 + WMSetButtonText(panel->swi[8], _("Smooth font edges (needs restart)."));
45 if (!WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
46 - WMSetButtonEnabled(panel->swi[7], False);
48 + WMSetButtonEnabled(panel->swi[8], False);
50 WMRealizeWidget(panel->box);
51 WMMapSubwidgets(panel->box);
54 SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling");
55 SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
56 SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
57 + SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
58 if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
59 - SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "AntialiasedText");
60 + SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "AntialiasedText");
64 Binary files wm-a/contrib/.single_click.diff.swp and wm-c/contrib/.single_click.diff.swp differ
65 diff -urN wm-a/src/WindowMaker.h wm-c/src/WindowMaker.h
66 --- wm-a/src/WindowMaker.h 2003-01-16 18:30:48.000000000 -0500
67 +++ wm-c/src/WindowMaker.h 2003-05-19 12:27:57.000000000 -0400
69 /* shading animation */
70 signed char shade_speed;
72 + /* single click to lauch applications */
78 diff -urN wm-a/src/appicon.c wm-c/src/appicon.c
79 --- wm-a/src/appicon.c 2003-01-16 18:30:48.000000000 -0500
80 +++ wm-c/src/appicon.c 2003-05-19 12:27:01.000000000 -0400
82 int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
84 int clickButton = event->xbutton.button;
85 + Bool hasMoved = False;
88 Bool movingSingle = False;
95 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
96 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
99 if (wPreferences.auto_arrange_icons)
100 wArrangeIcons(scr, True);
103 + if (!hasMoved && wPreferences.single_click)
104 + iconDblClick(desc, event);
108 diff -urN wm-a/src/defaults.c wm-c/src/defaults.c
109 --- wm-a/src/defaults.c 2003-01-16 18:30:48.000000000 -0500
110 +++ wm-c/src/defaults.c 2003-05-19 12:27:17.000000000 -0400
112 {"DisableBlinking", "NO", NULL,
113 &wPreferences.dont_blink, getBool, NULL
115 + {"SingleClickLaunch", "NO", NULL,
116 + &wPreferences.single_click, getBool, NULL
119 {"MenuStyle", "normal", seMenuStyles,
120 &wPreferences.menu_style, getEnum, setMenuStyle
121 diff -urN wm-a/src/dock.c wm-c/src/dock.c
122 --- wm-a/src/dock.c 2003-02-28 07:42:17.000000000 -0500
123 +++ wm-c/src/dock.c 2003-05-19 12:27:33.000000000 -0400
124 @@ -3782,7 +3782,7 @@
130 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
132 WScreen *scr = dock->screen_ptr;
133 @@ -3798,6 +3798,7 @@
137 + Bool hasMoved = False;
138 int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
139 int omnipresent = aicon->omnipresent; /* this must be cached!!! */
141 @@ -3852,6 +3853,7 @@
147 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
148 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
149 @@ -4001,7 +4003,7 @@
151 puts("End icon move");
158 @@ -4140,8 +4142,11 @@
159 handleClipChangeWorkspace(scr, event);
161 handleDockMove(dock, aicon, event);
163 - handleIconMove(dock, aicon, event);
165 + Bool hasMoved = handleIconMove(dock, aicon, event);
166 + if (!hasMoved && wPreferences.single_click)
167 + iconDblClick(desc, event);
170 } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
171 aicon==scr->clip_icon) {
172 diff -urN wm-a/src/icon.c wm-c/src/icon.c
173 --- wm-a/src/icon.c 2003-01-16 18:30:49.000000000 -0500
174 +++ wm-c/src/icon.c 2003-05-19 12:27:44.000000000 -0400
176 int dx=event->xbutton.x, dy=event->xbutton.y;
178 int clickButton=event->xbutton.button;
180 + Bool hasMoved = False;
182 if (WCHECK_STATE(WSTATE_MODAL))
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);