1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

New patch against 0.62.1

This commit is contained in:
dan
2000-09-27 22:20:21 +00:00
parent 3de3009cee
commit df357ae1de

View File

@@ -1,361 +1,202 @@
diff -rc WindowMaker-0.52.0.ori/WPrefs.app/Appearance.c WindowMaker-0.52.0/WPrefs.app/Appearance.c diff -urN WindowMaker-0.62.1/WPrefs.app/Expert.c WindowMaker-0.62.1.patched/WPrefs.app/Expert.c
*** WindowMaker-0.52.0.ori/WPrefs.app/Appearance.c Mon Mar 22 12:16:49 1999 --- WindowMaker-0.62.1/WPrefs.app/Expert.c Fri Sep 17 17:03:54 1999
--- WindowMaker-0.52.0/WPrefs.app/Appearance.c Wed Apr 21 08:24:11 1999 +++ WindowMaker-0.62.1.patched/WPrefs.app/Expert.c Wed Aug 16 20:43:48 2000
*************** @@ -33,7 +33,7 @@
*** 1286,1315 ****
WMWindow *win;
setupTextureFor(panel->texLs, "FTitleBack", "(solid, black)",
"[Focused]", i); - WMButton *swi[8];
! panel->textureIndex[i] = i++; + WMButton *swi[9];
setupTextureFor(panel->texLs, "UTitleBack", "(solid, gray)", } _Panel;
"[Unfocused]", i);
! panel->textureIndex[i] = i++; @@ -53,6 +53,7 @@
WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders"));
setupTextureFor(panel->texLs, "PTitleBack", "(solid, \"#616161\")", WMSetButtonSelected(panel->swi[4], GetBoolForKey("DisableBlinking"));
"[Owner of Focused]", i); WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
! panel->textureIndex[i] = i++; + WMSetButtonSelected(panel->swi[6], GetBoolForKey("SingleClickLaunch"));
}
setupTextureFor(panel->texLs, "MenuTitleBack", "(solid, black)",
"[Menu Title]", i);
! panel->textureIndex[i] = i++; @@ -66,7 +67,7 @@
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
setupTextureFor(panel->texLs, "MenuTextBack", "(solid, gray)", WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
"[Menu Item]", i);
! panel->textureIndex[i] = i++; - for (i=0; i<6; i++) {
+ for (i=0; i<7; i++) {
setupTextureFor(panel->texLs, "IconBack", "(solid, gray)", "[Icon]", i); panel->swi[i] = WMCreateSwitchButton(panel->frame);
! panel->textureIndex[i] = i++; WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
/* WMMoveWidget(panel->swi[i], 20, 20+i*25);
setupTextureFor(panel->texLs, "WorkspaceBack", "(solid, black)", @@ -78,6 +79,7 @@
"[Workspace]", i); WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects"));
! panel->textureIndex[i] = i++; WMSetButtonText(panel->swi[4], _("Disable cycling color highlighting of icons."));
*/ WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command."));
+ WMSetButtonText(panel->swi[6], _("Launch applications and restore windows with a single click"));
updatePreviewBox(panel, EVERYTHING);
--- 1286,1315 ---- WMRealizeWidget(panel->frame);
WMMapSubwidgets(panel->frame);
setupTextureFor(panel->texLs, "FTitleBack", "(solid, black)", @@ -99,6 +101,7 @@
"[Focused]", i); SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders");
! panel->textureIndex[i++] = i; SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DisableBlinking");
SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
setupTextureFor(panel->texLs, "UTitleBack", "(solid, gray)", + SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "SingleClickLaunch");
"[Unfocused]", i); }
! panel->textureIndex[i++] = i;
setupTextureFor(panel->texLs, "PTitleBack", "(solid, \"#616161\")", diff -urN WindowMaker-0.62.1/src/WindowMaker.h WindowMaker-0.62.1.patched/src/WindowMaker.h
"[Owner of Focused]", i); --- WindowMaker-0.62.1/src/WindowMaker.h Tue Mar 28 22:23:38 2000
! panel->textureIndex[i++] = i; +++ WindowMaker-0.62.1.patched/src/WindowMaker.h Wed Aug 16 20:37:00 2000
@@ -416,6 +416,9 @@
setupTextureFor(panel->texLs, "MenuTitleBack", "(solid, black)", /* shading animation */
"[Menu Title]", i); signed char shade_speed;
! panel->textureIndex[i++] = i;
+ /* single click to lauch applications */
setupTextureFor(panel->texLs, "MenuTextBack", "(solid, gray)", + char single_click;
"[Menu Item]", i); +
! panel->textureIndex[i++] = i; int edge_resistance;
char attract;
setupTextureFor(panel->texLs, "IconBack", "(solid, gray)", "[Icon]", i);
! panel->textureIndex[i++] = i; diff -urN WindowMaker-0.62.1/src/appicon.c WindowMaker-0.62.1.patched/src/appicon.c
/* --- WindowMaker-0.62.1/src/appicon.c Wed Mar 29 21:52:10 2000
setupTextureFor(panel->texLs, "WorkspaceBack", "(solid, black)", +++ WindowMaker-0.62.1.patched/src/appicon.c Wed Aug 16 20:37:00 2000
"[Workspace]", i); @@ -717,6 +717,7 @@
! panel->textureIndex[i++] = i; int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
*/ int ix, iy;
int clickButton = event->xbutton.button;
updatePreviewBox(panel, EVERYTHING); + Bool hasMoved;
diff -rc WindowMaker-0.52.0.ori/WPrefs.app/Expert.c WindowMaker-0.52.0/WPrefs.app/Expert.c Pixmap ghost = None;
*** WindowMaker-0.52.0.ori/WPrefs.app/Expert.c Thu Mar 18 17:39:22 1999 Window wins[2];
--- WindowMaker-0.52.0/WPrefs.app/Expert.c Thu Apr 15 09:02:54 1999
*************** @@ -786,6 +787,7 @@
*** 31,37 **** XClearWindow(dpy, scr->dock_shadow);
}
WMWindow *win;
+ hasMoved = False;
! WMButton *swi[5]; while (!done) {
WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
} _Panel; |ButtonMotionMask|ExposureMask, &ev);
@@ -795,6 +797,7 @@
--- 31,37 ---- break;
WMWindow *win; case MotionNotify:
+ hasMoved = True;
! WMButton *swi[6]; if (!grabbed) {
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
} _Panel; || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
@@ -925,6 +928,9 @@
*************** wArrangeIcons(scr, True);
*** 50,55 ****
--- 50,56 ---- done = 1;
WMSetButtonSelected(panel->swi[2], GetBoolForKey("SaveSessionOnExit")); + if (!hasMoved && wPreferences.single_click) {
WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders")); + iconDblClick(desc, event);
WMSetButtonSelected(panel->swi[4], GetBoolForKey("DisableBlinking")); + }
+ WMSetButtonSelected(panel->swi[5], GetBoolForKey("SingleClickLaunch")); break;
} }
}
diff -urN WindowMaker-0.62.1/src/defaults.c WindowMaker-0.62.1.patched/src/defaults.c
*************** --- WindowMaker-0.62.1/src/defaults.c Tue Mar 28 22:58:25 2000
*** 63,69 **** +++ WindowMaker-0.62.1.patched/src/defaults.c Wed Aug 16 20:37:58 2000
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT); @@ -530,6 +530,9 @@
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP); {"DisableBlinking", "NO", NULL,
&wPreferences.dont_blink, getBool, NULL
! for (i=0; i<5; i++) { },
panel->swi[i] = WMCreateSwitchButton(panel->frame); + {"SingleClickLaunch", "NO", NULL,
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25); + &wPreferences.single_click, getBool, NULL
WMMoveWidget(panel->swi[i], 20, 20+i*25); + },
--- 64,70 ---- /* style options */
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT); {"MenuStyle", "normal", seMenuStyles,
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP); &wPreferences.menu_style, getEnum, setMenuStyle
diff -urN WindowMaker-0.62.1/src/dock.c WindowMaker-0.62.1.patched/src/dock.c
! for (i=0; i<6; i++) { --- WindowMaker-0.62.1/src/dock.c Wed Mar 29 21:52:10 2000
panel->swi[i] = WMCreateSwitchButton(panel->frame); +++ WindowMaker-0.62.1.patched/src/dock.c Wed Aug 16 20:40:15 2000
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25); @@ -3750,7 +3750,7 @@
WMMoveWidget(panel->swi[i], 20, 20+i*25);
***************
*** 74,79 ****
--- 75,81 ---- -static void
WMSetButtonText(panel->swi[2], _("Automatically save session when exiting WindowMaker")); +static int
WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects")); handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
WMSetButtonText(panel->swi[4], _("Disable cycling color highlighting of icons.")); {
+ WMSetButtonText(panel->swi[5], _("Launch applications and restore windows with a single click")); WScreen *scr = dock->screen_ptr;
@@ -3765,11 +3765,11 @@
WMRealizeWidget(panel->frame); int ix = aicon->xindex, iy = aicon->yindex;
WMMapSubwidgets(panel->frame); int tmp;
*************** Pixmap ghost = None;
*** 94,99 **** - Bool docked;
--- 96,102 ---- + Bool docked, hasMoved;
SetBoolForKey(WMGetButtonSelected(panel->swi[2]), "SaveSessionOnExit"); int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders"); int omnipresent = aicon->omnipresent; /* this must be cached!!! */
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DisableBlinking");
+ SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "SingleClickLaunch"); -
} + hasMoved = False;
if (wPreferences.flags.noupdates)
return;
diff -rc WindowMaker-0.52.0.ori/src/WindowMaker.h WindowMaker-0.52.0/src/WindowMaker.h
*** WindowMaker-0.52.0.ori/src/WindowMaker.h Mon Mar 22 12:16:50 1999 @@ -3820,6 +3820,7 @@
--- WindowMaker-0.52.0/src/WindowMaker.h Wed Apr 14 10:35:40 1999 break;
***************
*** 348,353 **** case MotionNotify:
--- 348,356 ---- + hasMoved = True;
/* shading animation */ if (!grabbed) {
char shade_speed; if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
|| abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
+ /* single click to lauch applications */ @@ -3975,7 +3976,10 @@
+ char single_click; #ifdef DEBUG
+ puts("End icon move");
int edge_resistance; #endif
- return;
struct { + if (!hasMoved) {
diff -rc WindowMaker-0.52.0.ori/src/appicon.c WindowMaker-0.52.0/src/appicon.c + return 1;
*** WindowMaker-0.52.0.ori/src/appicon.c Thu Apr 1 12:33:57 1999 + }
--- WindowMaker-0.52.0/src/appicon.c Wed Apr 14 10:38:03 1999 + return 0;
*************** }
*** 710,715 **** }
--- 710,716 ---- }
int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0; @@ -4115,7 +4119,9 @@
int ix, iy; else
int clickButton = event->xbutton.button; handleDockMove(dock, aicon, event);
+ Bool hasMoved; } else
Pixmap ghost = None; - handleIconMove(dock, aicon, event);
+ if (handleIconMove(dock, aicon, event) != 0 &&
if (aicon->editing || WCHECK_STATE(WSTATE_MODAL)) + wPreferences.single_click)
*************** + iconDblClick(desc, event);
*** 758,763 ****
--- 759,765 ---- } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
dockable = canBeDocked(icon->owner); aicon==scr->clip_icon) {
diff -urN WindowMaker-0.62.1/src/icon.c WindowMaker-0.62.1.patched/src/icon.c
--- WindowMaker-0.62.1/src/icon.c Thu Jan 20 06:51:44 2000
+ hasMoved = False; +++ WindowMaker-0.62.1.patched/src/icon.c Wed Aug 16 20:37:00 2000
while (!done) { @@ -874,6 +874,7 @@
WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask int dx=event->xbutton.x, dy=event->xbutton.y;
|ButtonMotionMask|ExposureMask, &ev); int grabbed=0;
*************** int clickButton=event->xbutton.button;
*** 767,772 **** + Bool hasMoved;
--- 769,775 ----
break; if (WCHECK_STATE(WSTATE_MODAL))
return;
case MotionNotify: @@ -916,6 +917,7 @@
+ hasMoved = True; wwarning("pointer grab failed for icon move");
if (!grabbed) { #endif
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD }
|| abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) { + hasMoved = False;
*************** while(1) {
*** 917,922 **** WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
--- 920,928 ---- |ButtonMotionMask|ExposureMask, &ev);
XSetWindowBackground(dpy, scr->dock_shadow, scr->white_pixel); @@ -925,6 +927,7 @@
} break;
done = 1;
+ if (!hasMoved && wPreferences.single_click) { case MotionNotify:
+ iconDblClick(desc, event); + hasMoved = True;
+ } if (!grabbed) {
break; if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
} || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
} @@ -962,6 +965,9 @@
diff -rc WindowMaker-0.52.0.ori/src/defaults.c WindowMaker-0.52.0/src/defaults.c
*** WindowMaker-0.52.0.ori/src/defaults.c Mon Mar 22 12:16:51 1999 if (wPreferences.auto_arrange_icons)
--- WindowMaker-0.52.0/src/defaults.c Wed Apr 14 10:54:24 1999 wArrangeIcons(wwin->screen_ptr, True);
*************** + if (!hasMoved && wPreferences.single_click) {
*** 445,450 **** + miniwindowDblClick(desc, event);
--- 445,453 ---- + }
{"DisableBlinking", "NO", NULL, return;
&wPreferences.dont_blink, getBool, NULL
}, }
+ {"SingleClickLaunch", "NO", NULL,
+ &wPreferences.single_click, getBool, NULL
+ },
#ifdef WEENDOZE_CYCLE
{"WindozeCycling","NO", NULL,
&wPreferences.windoze_cycling, getBool, NULL
diff -rc WindowMaker-0.52.0.ori/src/dock.c WindowMaker-0.52.0/src/dock.c
*** WindowMaker-0.52.0.ori/src/dock.c Mon Mar 22 12:16:51 1999
--- WindowMaker-0.52.0/src/dock.c Wed Apr 14 10:37:30 1999
***************
*** 3484,3490 ****
! static void
handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
{
WScreen *scr = dock->screen_ptr;
--- 3484,3490 ----
! static int
handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
{
WScreen *scr = dock->screen_ptr;
***************
*** 3499,3507 ****
int ix = aicon->xindex, iy = aicon->yindex;
int tmp;
Pixmap ghost = None;
! Bool docked;
int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
if (wPreferences.flags.noupdates)
return;
--- 3499,3508 ----
int ix = aicon->xindex, iy = aicon->yindex;
int tmp;
Pixmap ghost = None;
! Bool docked, hasMoved;
int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
+ hasMoved = False;
if (wPreferences.flags.noupdates)
return;
***************
*** 3551,3556 ****
--- 3552,3558 ----
break;
case MotionNotify:
+ hasMoved = True;
if (!grabbed) {
if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
|| abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
***************
*** 3690,3696 ****
#ifdef DEBUG
puts("End icon move");
#endif
! return;
}
}
}
--- 3692,3701 ----
#ifdef DEBUG
puts("End icon move");
#endif
! if (!hasMoved) {
! return 1;
! }
! return 0;
}
}
}
***************
*** 3807,3813 ****
XUnmapWindow(dpy, scr->clip_balloon);
scr->flags.clip_balloon_mapped = 0;
}
!
#ifdef DEBUG
puts("handling dock");
#endif
--- 3812,3818 ----
XUnmapWindow(dpy, scr->clip_balloon);
scr->flags.clip_balloon_mapped = 0;
}
!
#ifdef DEBUG
puts("handling dock");
#endif
***************
*** 3830,3836 ****
else
handleDockMove(dock, aicon, event);
} else
! handleIconMove(dock, aicon, event);
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
aicon->xindex==0 && aicon->yindex==0) {
--- 3835,3843 ----
else
handleDockMove(dock, aicon, event);
} else
! if (handleIconMove(dock, aicon, event) != 0 &&
! wPreferences.single_click)
! iconDblClick(desc, event);
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
aicon->xindex==0 && aicon->yindex==0) {
diff -rc WindowMaker-0.52.0.ori/src/icon.c WindowMaker-0.52.0/src/icon.c
*** WindowMaker-0.52.0.ori/src/icon.c Thu Mar 18 17:39:39 1999
--- WindowMaker-0.52.0/src/icon.c Wed Apr 14 10:37:02 1999
***************
*** 809,814 ****
--- 809,815 ----
int dx=event->xbutton.x, dy=event->xbutton.y;
int grabbed=0;
int clickButton=event->xbutton.button;
+ Bool hasMoved;
if (WCHECK_STATE(WSTATE_MODAL))
return;
***************
*** 851,856 ****
--- 852,858 ----
wwarning("pointer grab failed for icon move");
#endif
}
+ hasMoved = False;
while(1) {
WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
|ButtonMotionMask|ExposureMask, &ev);
***************
*** 860,865 ****
--- 862,868 ----
break;
case MotionNotify:
+ hasMoved = True;
if (!grabbed) {
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
|| abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
***************
*** 897,902 ****
--- 900,908 ----
if (wPreferences.auto_arrange_icons)
wArrangeIcons(wwin->screen_ptr, True);
+ if (!hasMoved && wPreferences.single_click) {
+ miniwindowDblClick(desc, event);
+ }
return;
}