SOURCES (DEVEL): WindowMaker-singleclick.patch - adaptized to new ...
krolik
krolik at pld-linux.org
Wed Jun 22 12:25:33 CEST 2005
Author: krolik Date: Wed Jun 22 10:25:33 2005 GMT
Module: SOURCES Tag: DEVEL
---- Log message:
- adaptized to new sources
---- Files affected:
SOURCES:
WindowMaker-singleclick.patch (1.9.4.1 -> 1.9.4.2)
---- Diffs:
================================================================
Index: SOURCES/WindowMaker-singleclick.patch
diff -u SOURCES/WindowMaker-singleclick.patch:1.9.4.1 SOURCES/WindowMaker-singleclick.patch:1.9.4.2
--- SOURCES/WindowMaker-singleclick.patch:1.9.4.1 Fri Mar 26 16:23:37 2004
+++ SOURCES/WindowMaker-singleclick.patch Wed Jun 22 12:25:27 2005
@@ -1,64 +1,7 @@
---- WindowMaker-0.65.1/WPrefs.app/Expert.c.orig Mon Jun 4 19:47:32 2001
-+++ WindowMaker-0.65.1/WPrefs.app/Expert.c Thu Jul 26 12:09:03 2001
-@@ -33,7 +33,7 @@
-
- WMWidget *parent;
-
-- WMButton *swi[8];
-+ WMButton *swi[10];
-
- } _Panel;
-
-@@ -54,6 +54,7 @@
- WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
- if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
- WMSetButtonSelected(panel->swi[7], GetBoolForKey("AntialiasedText"));
-+ WMSetButtonSelected(panel->swi[8], GetBoolForKey("SingleClickLaunch"));
- }
-
-
-@@ -66,7 +67,7 @@
- panel->box = WMCreateBox(panel->parent);
- WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
-
-- for (i=0; i<8; i++) {
-+ for (i=0; i<9; i++) {
- panel->swi[i] = WMCreateSwitchButton(panel->box);
- WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
- WMMoveWidget(panel->swi[i], 20, 20+i*25);
-@@ -79,6 +80,7 @@
- WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command."));
- WMSetButtonText(panel->swi[6], _("Disable selection animation for selected icons."));
- WMSetButtonText(panel->swi[7], _("Smooth font edges (needs restart)."));
-+ WMSetButtonText(panel->swi[8], _("Launch applications and restore windows with a single click"));
-
- if (!WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
- WMSetButtonEnabled(panel->swi[7], False);
-@@ -101,6 +103,7 @@
- SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
- if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
- SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "AntialiasedText");
-+ SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "SingleClickLaunch");
- }
-
-
-diff -ur WindowMaker-0.64.0/src/WindowMaker.h WindowMaker-0.64.0.new/src/WindowMaker.h
---- WindowMaker-0.64.0/src/WindowMaker.h Fri Feb 9 16:56:53 2001
-+++ WindowMaker-0.64.0.new/src/WindowMaker.h Wed Mar 21 19:59:08 2001
-@@ -435,6 +435,9 @@
- /* shading animation */
- signed char shade_speed;
-
-+ /* single click to lauch applications */
-+ char single_click;
-+
- int edge_resistance;
- char attract;
-
-diff -ur WindowMaker-0.64.0/src/appicon.c WindowMaker-0.64.0.new/src/appicon.c
---- WindowMaker-0.64.0/src/appicon.c Thu Jan 18 20:21:57 2001
-+++ WindowMaker-0.64.0.new/src/appicon.c Wed Mar 21 19:59:08 2001
-@@ -704,6 +704,7 @@
+diff -urN WindowMaker-0.92.0.orig/src/appicon.c WindowMaker-0.92.0/src/appicon.c
+--- WindowMaker-0.92.0.orig/src/appicon.c 2005-06-21 19:48:05.760714592 +0200
++++ WindowMaker-0.92.0/src/appicon.c 2005-06-22 12:15:03.925074832 +0200
+@@ -585,6 +585,7 @@
int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
int ix, iy;
int clickButton = event->xbutton.button;
@@ -66,49 +9,52 @@
Pixmap ghost = None;
Window wins[2];
Bool movingSingle = False;
-@@ -785,6 +786,7 @@
+@@ -655,7 +656,7 @@
+ ghost);
XClearWindow(dpy, scr->dock_shadow);
}
-
+-
+ hasMoved = False;
while (!done) {
- WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
- |ButtonMotionMask|ExposureMask, &ev);
-@@ -794,6 +796,7 @@
- break;
-
- case MotionNotify:
-+ hasMoved = True;
- if (!grabbed) {
- if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
- || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
-@@ -943,6 +946,9 @@
- wArrangeIcons(scr, True);
-
- done = 1;
-+ if (!hasMoved && wPreferences.single_click) {
-+ iconDblClick(desc, event);
-+ }
- break;
- }
+ WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
+ |ButtonMotionMask|ExposureMask, &ev);
+@@ -665,6 +666,7 @@
+ break;
+
+ case MotionNotify:
++ hasMoved = True;
+ if (!grabbed) {
+ if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
+ || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
+@@ -803,7 +805,10 @@
+ wArrangeIcons(scr, True);
+
+ done = 1;
+- break;
++ if (!hasMoved && wPreferences.single_click) {
++ iconDblClick(desc, event);
++ }
++ break;
+ }
}
-diff -ur WindowMaker-0.64.0/src/defaults.c WindowMaker-0.64.0.new/src/defaults.c
---- WindowMaker-0.64.0/src/defaults.c Thu Jan 18 20:21:57 2001
-+++ WindowMaker-0.64.0.new/src/defaults.c Wed Mar 21 19:59:08 2001
-@@ -547,6 +547,9 @@
+ #ifdef DEBUG
+diff -urN WindowMaker-0.92.0.orig/src/defaults.c WindowMaker-0.92.0/src/defaults.c
+--- WindowMaker-0.92.0.orig/src/defaults.c 2005-06-21 19:48:05.770713072 +0200
++++ WindowMaker-0.92.0/src/defaults.c 2005-06-22 12:16:31.894701416 +0200
+@@ -553,6 +553,9 @@
{"DisableBlinking", "NO", NULL,
&wPreferences.dont_blink, getBool, NULL
},
-+ {"SingleClickLaunch", "NO", NULL,
-+ &wPreferences.single_click, getBool, NULL
-+ },
++ {"SingleClickLaunch", "NO", NULL,
++ &wPreferences.single_click, getBool, NULL
++ },
/* style options */
{"MenuStyle", "normal", seMenuStyles,
&wPreferences.menu_style, getEnum, setMenuStyle
-diff -ur WindowMaker-0.64.0/src/dock.c WindowMaker-0.64.0.new/src/dock.c
---- WindowMaker-0.64.0/src/dock.c Thu Jan 18 02:33:45 2001
-+++ WindowMaker-0.64.0.new/src/dock.c Wed Mar 21 19:59:08 2001
-@@ -3752,7 +3752,7 @@
+diff -urN WindowMaker-0.92.0.orig/src/dock.c WindowMaker-0.92.0/src/dock.c
+--- WindowMaker-0.92.0.orig/src/dock.c 2005-06-21 19:48:05.771712920 +0200
++++ WindowMaker-0.92.0/src/dock.c 2005-06-22 12:21:16.109494200 +0200
+@@ -3758,7 +3758,7 @@
@@ -117,7 +63,7 @@
handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
{
WScreen *scr = dock->screen_ptr;
-@@ -3767,11 +3767,11 @@
+@@ -3773,11 +3773,10 @@
int ix = aicon->xindex, iy = aicon->yindex;
int tmp;
Pixmap ghost = None;
@@ -125,77 +71,139 @@
+ Bool docked, hasMoved;
int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
int omnipresent = aicon->omnipresent; /* this must be cached!!! */
-
+-
-
+ hasMoved = False;
if (wPreferences.flags.noupdates)
- return;
+ return;
-@@ -3822,6 +3822,7 @@
- break;
+@@ -3828,6 +3827,7 @@
+ break;
- case MotionNotify:
-+ hasMoved = True;
- if (!grabbed) {
- if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
- || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
-@@ -3977,7 +3978,10 @@
+ case MotionNotify:
++ hasMoved = True;
+ if (!grabbed) {
+ if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
+ || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
+@@ -3977,7 +3977,10 @@
#ifdef DEBUG
- puts("End icon move");
+ puts("End icon move");
#endif
-- return;
-+ if (!hasMoved) {
-+ return 1;
-+ }
-+ return 0;
- }
+- return;
++ if (!hasMoved) {
++ return 1;
++ }
++ return 0;
+ }
}
}
-@@ -4117,7 +4121,9 @@
+@@ -4117,8 +4120,10 @@
else
handleDockMove(dock, aicon, event);
} else
-- handleIconMove(dock, aicon, event);
-+ if (handleIconMove(dock, aicon, event) != 0 &&
-+ wPreferences.single_click)
-+ iconDblClick(desc, event);
-
+- handleIconMove(dock, aicon, event);
+-
++ if (handleIconMove(dock, aicon, event) != 0 &&
++ wPreferences.single_click)
++ iconDblClick(desc, event);
++
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
aicon==scr->clip_icon) {
-diff -ur WindowMaker-0.64.0/src/icon.c WindowMaker-0.64.0.new/src/icon.c
---- WindowMaker-0.64.0/src/icon.c Sat Jan 6 19:54:16 2001
-+++ WindowMaker-0.64.0.new/src/icon.c Wed Mar 21 19:59:08 2001
-@@ -874,6 +874,7 @@
+ if (!scr->clip_ws_menu) {
+diff -urN WindowMaker-0.92.0.orig/src/icon.c WindowMaker-0.92.0/src/icon.c
+--- WindowMaker-0.92.0.orig/src/icon.c 2005-06-21 19:48:05.772712768 +0200
++++ WindowMaker-0.92.0/src/icon.c 2005-06-22 12:23:42.641217992 +0200
+@@ -891,6 +891,7 @@
int dx=event->xbutton.x, dy=event->xbutton.y;
int grabbed=0;
int clickButton=event->xbutton.button;
-+ Bool hasMoved;
++ Bool hasMoved;
if (WCHECK_STATE(WSTATE_MODAL))
- return;
-@@ -916,6 +917,7 @@
- wwarning("pointer grab failed for icon move");
+ return;
+@@ -933,6 +934,7 @@
+ wwarning("pointer grab failed for icon move");
#endif
}
-+ hasMoved = False;
++ hasMoved = False;
while(1) {
- WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
- |ButtonMotionMask|ExposureMask, &ev);
-@@ -925,6 +927,7 @@
- break;
-
- case MotionNotify:
-+ hasMoved = True;
- if (!grabbed) {
- if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
- || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
-@@ -962,6 +965,9 @@
-
- if (wPreferences.auto_arrange_icons)
- wArrangeIcons(wwin->screen_ptr, True);
-+ if (!hasMoved && wPreferences.single_click) {
-+ miniwindowDblClick(desc, event);
-+ }
- return;
-
- }
+ WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
+ |ButtonMotionMask|ExposureMask, &ev);
+@@ -942,6 +944,7 @@
+ break;
+
+ case MotionNotify:
++ hasMoved = True;
+ if (!grabbed) {
+ if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
+ || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
+@@ -979,6 +982,10 @@
+
+ if (wPreferences.auto_arrange_icons)
+ wArrangeIcons(wwin->screen_ptr, True);
++ if (!hasMoved && wPreferences.single_click) {
++ miniwindowDblClick(desc, event);
++ }
++
+ return;
+
+ }
+diff -urN WindowMaker-0.92.0.orig/src/WindowMaker.h WindowMaker-0.92.0/src/WindowMaker.h
+--- WindowMaker-0.92.0.orig/src/WindowMaker.h 2005-06-21 19:48:05.760714592 +0200
++++ WindowMaker-0.92.0/src/WindowMaker.h 2005-06-22 12:03:11.587366624 +0200
+@@ -466,6 +466,10 @@
+ /* shading animation */
+ signed char shade_speed;
+
++ /* single click to lauch applications */
++ char single_click;
++
++
+ int edge_resistance;
+ char attract;
+
+diff -urN WindowMaker-0.92.0.orig/WPrefs.app/Expert.c WindowMaker-0.92.0/WPrefs.app/Expert.c
+--- WindowMaker-0.92.0.orig/WPrefs.app/Expert.c 2005-06-21 19:48:05.979681304 +0200
++++ WindowMaker-0.92.0/WPrefs.app/Expert.c 2005-06-22 12:01:07.250268736 +0200
+@@ -33,7 +33,7 @@
+
+ WMWidget *parent;
+
+- WMButton *swi[8];
++ WMButton *swi[10];
+
+ } _Panel;
+
+@@ -54,6 +54,7 @@
+ 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,7 +67,7 @@
+ panel->box = WMCreateBox(panel->parent);
+ WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
+
+- for (i=0; i<7; i++) {
++ 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,6 +80,7 @@
+ 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,6 +105,7 @@
+ SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DontConfirmKill");
+ SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking");
+ SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText");
++ SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
+ }
+
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/WindowMaker-singleclick.patch?r1=1.9.4.1&r2=1.9.4.2&f=u
More information about the pld-cvs-commit
mailing list