1 --- WindowMaker-0.65.1/WPrefs.app/Expert.c.orig Mon Jun 4 19:47:32 2001
2 +++ WindowMaker-0.65.1/WPrefs.app/Expert.c Thu Jul 26 12:09:03 2001
13 WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
14 if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
15 WMSetButtonSelected(panel->swi[7], GetBoolForKey("AntialiasedText"));
16 + WMSetButtonSelected(panel->swi[8], GetBoolForKey("SingleClickLaunch"));
21 panel->box = WMCreateBox(panel->parent);
22 WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
24 - for (i=0; i<8; i++) {
25 + for (i=0; i<9; i++) {
26 panel->swi[i] = WMCreateSwitchButton(panel->box);
27 WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
28 WMMoveWidget(panel->swi[i], 20, 20+i*25);
30 WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command."));
31 WMSetButtonText(panel->swi[6], _("Disable selection animation for selected icons."));
32 WMSetButtonText(panel->swi[7], _("Smooth font edges (needs restart)."));
33 + WMSetButtonText(panel->swi[8], _("Launch applications and restore windows with a single click"));
35 if (!WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
36 WMSetButtonEnabled(panel->swi[7], False);
38 SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
39 if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
40 SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "AntialiasedText");
41 + SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "SingleClickLaunch");
45 diff -ur WindowMaker-0.64.0/src/WindowMaker.h WindowMaker-0.64.0.new/src/WindowMaker.h
46 --- WindowMaker-0.64.0/src/WindowMaker.h Fri Feb 9 16:56:53 2001
47 +++ WindowMaker-0.64.0.new/src/WindowMaker.h Wed Mar 21 19:59:08 2001
49 /* shading animation */
50 signed char shade_speed;
52 + /* single click to lauch applications */
58 diff -ur WindowMaker-0.64.0/src/appicon.c WindowMaker-0.64.0.new/src/appicon.c
59 --- WindowMaker-0.64.0/src/appicon.c Thu Jan 18 20:21:57 2001
60 +++ WindowMaker-0.64.0.new/src/appicon.c Wed Mar 21 19:59:08 2001
62 int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
64 int clickButton = event->xbutton.button;
68 Bool movingSingle = False;
70 XClearWindow(dpy, scr->dock_shadow);
75 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
76 |ButtonMotionMask|ExposureMask, &ev);
83 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
84 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
86 wArrangeIcons(scr, True);
89 + if (!hasMoved && wPreferences.single_click) {
90 + iconDblClick(desc, event);
95 diff -ur WindowMaker-0.64.0/src/defaults.c WindowMaker-0.64.0.new/src/defaults.c
96 --- WindowMaker-0.64.0/src/defaults.c Thu Jan 18 20:21:57 2001
97 +++ WindowMaker-0.64.0.new/src/defaults.c Wed Mar 21 19:59:08 2001
99 {"DisableBlinking", "NO", NULL,
100 &wPreferences.dont_blink, getBool, NULL
102 + {"SingleClickLaunch", "NO", NULL,
103 + &wPreferences.single_click, getBool, NULL
106 {"MenuStyle", "normal", seMenuStyles,
107 &wPreferences.menu_style, getEnum, setMenuStyle
108 diff -ur WindowMaker-0.64.0/src/dock.c WindowMaker-0.64.0.new/src/dock.c
109 --- WindowMaker-0.64.0/src/dock.c Thu Jan 18 02:33:45 2001
110 +++ WindowMaker-0.64.0.new/src/dock.c Wed Mar 21 19:59:08 2001
111 @@ -3752,7 +3752,7 @@
117 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
119 WScreen *scr = dock->screen_ptr;
120 @@ -3767,11 +3767,11 @@
121 int ix = aicon->xindex, iy = aicon->yindex;
125 + Bool docked, hasMoved;
126 int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
127 int omnipresent = aicon->omnipresent; /* this must be cached!!! */
131 if (wPreferences.flags.noupdates)
134 @@ -3822,6 +3822,7 @@
140 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
141 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
142 @@ -3977,7 +3978,10 @@
144 puts("End icon move");
154 @@ -4117,7 +4121,9 @@
156 handleDockMove(dock, aicon, event);
158 - handleIconMove(dock, aicon, event);
159 + if (handleIconMove(dock, aicon, event) != 0 &&
160 + wPreferences.single_click)
161 + iconDblClick(desc, event);
163 } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
164 aicon==scr->clip_icon) {
165 diff -ur WindowMaker-0.64.0/src/icon.c WindowMaker-0.64.0.new/src/icon.c
166 --- WindowMaker-0.64.0/src/icon.c Sat Jan 6 19:54:16 2001
167 +++ WindowMaker-0.64.0.new/src/icon.c Wed Mar 21 19:59:08 2001
169 int dx=event->xbutton.x, dy=event->xbutton.y;
171 int clickButton=event->xbutton.button;
174 if (WCHECK_STATE(WSTATE_MODAL))
177 wwarning("pointer grab failed for icon move");
182 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
183 |ButtonMotionMask|ExposureMask, &ev);
190 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
191 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
194 if (wPreferences.auto_arrange_icons)
195 wArrangeIcons(wwin->screen_ptr, True);
196 + if (!hasMoved && wPreferences.single_click) {
197 + miniwindowDblClick(desc, event);