diff -cr ../WindowMaker-0.92.0-bak/WPrefs.app/Expert.c ./WPrefs.app/Expert.c *** ../WindowMaker-0.92.0-bak/WPrefs.app/Expert.c Sat Oct 23 07:04:38 2004 --- ./WPrefs.app/Expert.c Tue Sep 20 19:32:57 2005 *************** *** 54,59 **** --- 54,60 ---- WMSetButtonSelected(panel->swi[4], GetBoolForKey("DontConfirmKill")); WMSetButtonSelected(panel->swi[5], GetBoolForKey("DisableBlinking")); WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText")); + WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch")); } *************** *** 66,72 **** panel->box = WMCreateBox(panel->parent); WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2); ! for (i=0; i<7; i++) { panel->swi[i] = WMCreateSwitchButton(panel->box); WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25); WMMoveWidget(panel->swi[i], 20, 20+i*25); --- 67,73 ---- panel->box = WMCreateBox(panel->parent); WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2); ! for (i=0; i<8; i++) { panel->swi[i] = WMCreateSwitchButton(panel->box); WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25); WMMoveWidget(panel->swi[i], 20, 20+i*25); *************** *** 79,84 **** --- 80,86 ---- WMSetButtonText(panel->swi[4], _("Disable confirmation panel for the Kill command.")); WMSetButtonText(panel->swi[5], _("Disable selection animation for selected icons.")); WMSetButtonText(panel->swi[6], _("Smooth font edges (needs restart).")); + WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click.")); WMSetButtonEnabled(panel->swi[6], True); *************** *** 103,108 **** --- 105,111 ---- SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DontConfirmKill"); SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking"); SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText"); + SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch"); } diff -cr ../WindowMaker-0.92.0-bak/src/WindowMaker.h ./src/WindowMaker.h *** ../WindowMaker-0.92.0-bak/src/WindowMaker.h Mon Oct 25 05:48:39 2004 --- ./src/WindowMaker.h Tue Sep 20 19:32:57 2005 *************** *** 475,480 **** --- 475,483 ---- RImage *swtileImage; RImage *swbackImage[9]; + /* single click to lauch applications */ + char single_click; + struct { unsigned int nodock:1; /* don't display the dock */ unsigned int noclip:1; /* don't display the clip */ Only in ./src: WindowMaker.h~ diff -cr ../WindowMaker-0.92.0-bak/src/appicon.c ./src/appicon.c *** ../WindowMaker-0.92.0-bak/src/appicon.c Thu Oct 14 21:31:49 2004 --- ./src/appicon.c Tue Sep 20 19:40:51 2005 *************** *** 590,595 **** --- 590,596 ---- Bool movingSingle = False; int oldX = x; int oldY = y; + Bool hasMoved = False; if (aicon->editing || WCHECK_STATE(WSTATE_MODAL)) return; *************** *** 671,681 **** --- 672,688 ---- XChangeActivePointerGrab(dpy, ButtonMotionMask |ButtonReleaseMask|ButtonPressMask, wCursor[WCUR_MOVE], CurrentTime); + hasMoved = True; grabbed=1; } else { break; } } + else { + if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD + || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) + hasMoved = True; + } x = ev.xmotion.x_root - dx; y = ev.xmotion.y_root - dy; *************** *** 802,807 **** --- 809,817 ---- if (wPreferences.auto_arrange_icons) wArrangeIcons(scr, True); + if (wPreferences.single_click && !hasMoved) + iconDblClick(desc, event); + done = 1; break; } diff -cr ../WindowMaker-0.92.0-bak/src/defaults.c ./src/defaults.c *** ../WindowMaker-0.92.0-bak/src/defaults.c Fri Apr 8 14:59:16 2005 --- ./src/defaults.c Tue Sep 20 19:32:57 2005 *************** *** 553,558 **** --- 553,561 ---- {"DisableBlinking", "NO", NULL, &wPreferences.dont_blink, getBool, NULL }, + {"SingleClickLaunch", "NO", NULL, + &wPreferences.single_click, getBool, NULL + }, /* style options */ {"MenuStyle", "normal", seMenuStyles, &wPreferences.menu_style, getEnum, setMenuStyle Only in ./src: defaults.c~ diff -cr ../WindowMaker-0.92.0-bak/src/dock.c ./src/dock.c *** ../WindowMaker-0.92.0-bak/src/dock.c Sat Oct 23 07:10:40 2004 --- ./src/dock.c Tue Sep 20 19:40:51 2005 *************** *** 3758,3764 **** ! static void handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event) { WScreen *scr = dock->screen_ptr; --- 3758,3764 ---- ! static Bool handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event) { WScreen *scr = dock->screen_ptr; *************** *** 3776,3781 **** --- 3776,3782 ---- Bool docked; int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */ int omnipresent = aicon->omnipresent; /* this must be cached!!! */ + Bool hasMoved = False; if (wPreferences.flags.noupdates) *************** *** 3834,3844 **** --- 3835,3851 ---- XChangeActivePointerGrab(dpy, ButtonMotionMask |ButtonReleaseMask|ButtonPressMask, wCursor[WCUR_MOVE], CurrentTime); + hasMoved = True; grabbed=1; } else { break; } } + else { + if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD + || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) + hasMoved = True; + } if (omnipresent) { int i; *************** *** 3977,3985 **** #ifdef DEBUG puts("End icon move"); #endif ! return; } } } --- 3984,3994 ---- #ifdef DEBUG puts("End icon move"); #endif ! return hasMoved; } } + + return False; /* never reached */ } *************** *** 4116,4123 **** handleClipChangeWorkspace(scr, event); else handleDockMove(dock, aicon, event); ! } else ! handleIconMove(dock, aicon, event); } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP && aicon==scr->clip_icon) { --- 4125,4135 ---- handleClipChangeWorkspace(scr, event); else handleDockMove(dock, aicon, event); ! } else { ! Bool hasMoved = handleIconMove(dock, aicon, event); ! if (wPreferences.single_click && !hasMoved) ! iconDblClick(desc, event); ! } } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP && aicon==scr->clip_icon) { diff -cr ../WindowMaker-0.92.0-bak/src/icon.c ./src/icon.c *** ../WindowMaker-0.92.0-bak/src/icon.c Sat Mar 12 01:27:58 2005 --- ./src/icon.c Tue Sep 20 19:40:51 2005 *************** *** 891,896 **** --- 891,897 ---- int dx=event->xbutton.x, dy=event->xbutton.y; int grabbed=0; int clickButton=event->xbutton.button; + Bool hasMoved = False; if (WCHECK_STATE(WSTATE_MODAL)) return; *************** *** 948,958 **** --- 949,965 ---- XChangeActivePointerGrab(dpy, ButtonMotionMask |ButtonReleaseMask|ButtonPressMask, wCursor[WCUR_MOVE], CurrentTime); + hasMoved = True; grabbed=1; } else { break; } } + else { + if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD + || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) + hasMoved = True; + } x = ev.xmotion.x_root - dx; y = ev.xmotion.y_root - dy; XMoveWindow(dpy, icon->core->window, x, y); *************** *** 979,984 **** --- 986,993 ---- if (wPreferences.auto_arrange_icons) wArrangeIcons(wwin->screen_ptr, True); + if (wPreferences.single_click && !hasMoved) + miniwindowDblClick(desc, event); return; }