mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
updated single click patch
This commit is contained in:
@@ -81,6 +81,8 @@ Changes since version 0.80.2:
|
||||
- Added support for generating pkgconfig files for WINGS, wmlib and wrlib.
|
||||
("Marcelo E. Magallon" <mmagallo@debian.org>)
|
||||
- Support for multiline balloons (Vitaly Ovtchinnikov <ov@rbcmail.ru>)
|
||||
- Updated single-click contrib patch (steve lion <steve.lion@verizon.net>
|
||||
and vlaad)
|
||||
|
||||
|
||||
Changes since version 0.80.1:
|
||||
|
||||
@@ -7,7 +7,7 @@ wmaker developers for any problems with them.
|
||||
|
||||
allows single click in dock
|
||||
|
||||
for version: 0.80.2
|
||||
for version: 0.80.2+
|
||||
|
||||
author:
|
||||
Sebastien Bauer <seb_bauer@bigfoot.com>
|
||||
@@ -19,6 +19,9 @@ Daniel Richard G. <skunk@graphics.lcs.mit.edu>
|
||||
updated for Window Maker 0.80.2 by:
|
||||
Martial Daumas <martial@nasgaia.org>
|
||||
|
||||
update for 0.80.2+ by:
|
||||
steve lion <steve.lion@verizon.net> and vlaad
|
||||
|
||||
|
||||
*** workspace_flip.patch
|
||||
|
||||
|
||||
@@ -1,127 +1,70 @@
|
||||
diff -urN WindowMaker-0.80.2/src/appicon.c WindowMaker-0.80.2.modif/src/appicon.c
|
||||
--- WindowMaker-0.80.2/src/appicon.c 2002-01-08 14:45:07.000000000 +0100
|
||||
+++ WindowMaker-0.80.2.modif/src/appicon.c 2002-12-09 08:59:22.000000000 +0100
|
||||
@@ -596,6 +596,7 @@
|
||||
int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
|
||||
int ix, iy;
|
||||
int clickButton = event->xbutton.button;
|
||||
+ Bool hasMoved = False;
|
||||
Pixmap ghost = None;
|
||||
Window wins[2];
|
||||
Bool movingSingle = False;
|
||||
@@ -676,6 +677,7 @@
|
||||
break;
|
||||
diff -urN wm-a/WPrefs.app/Expert.c wm-c/WPrefs.app/Expert.c
|
||||
--- wm-a/WPrefs.app/Expert.c 2003-01-16 18:30:47.000000000 -0500
|
||||
+++ wm-c/WPrefs.app/Expert.c 2003-05-19 12:50:17.000000000 -0400
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
case MotionNotify:
|
||||
+ hasMoved = True;
|
||||
if (!grabbed) {
|
||||
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
|
||||
|| abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
|
||||
@@ -812,7 +814,8 @@
|
||||
WMWidget *parent;
|
||||
|
||||
if (wPreferences.auto_arrange_icons)
|
||||
wArrangeIcons(scr, True);
|
||||
-
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ iconDblClick(desc, event);
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
diff -urN WindowMaker-0.80.2/src/defaults.c WindowMaker-0.80.2.modif/src/defaults.c
|
||||
--- WindowMaker-0.80.2/src/defaults.c 2002-01-08 14:45:07.000000000 +0100
|
||||
+++ WindowMaker-0.80.2.modif/src/defaults.c 2002-12-09 09:00:01.000000000 +0100
|
||||
@@ -548,6 +548,9 @@
|
||||
{"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
|
||||
diff -urN WindowMaker-0.80.2/src/dock.c WindowMaker-0.80.2.modif/src/dock.c
|
||||
--- WindowMaker-0.80.2/src/dock.c 2002-02-21 12:28:48.000000000 +0100
|
||||
+++ WindowMaker-0.80.2.modif/src/dock.c 2002-12-09 09:02:58.000000000 +0100
|
||||
@@ -3773,7 +3773,7 @@
|
||||
- WMButton *swi[8];
|
||||
+ WMButton *swi[9];
|
||||
|
||||
} _Panel;
|
||||
|
||||
|
||||
-static void
|
||||
+static Bool
|
||||
handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
||||
{
|
||||
WScreen *scr = dock->screen_ptr;
|
||||
@@ -3789,6 +3789,7 @@
|
||||
int tmp;
|
||||
Pixmap ghost = None;
|
||||
Bool docked;
|
||||
+ Bool hasMoved = False;
|
||||
int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
|
||||
int omnipresent = aicon->omnipresent; /* this must be cached!!! */
|
||||
|
||||
@@ -3843,6 +3844,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) {
|
||||
@@ -3992,7 +3994,7 @@
|
||||
#ifdef DEBUG
|
||||
puts("End icon move");
|
||||
#endif
|
||||
- return;
|
||||
+ return hasMoved;
|
||||
}
|
||||
}
|
||||
@@ -54,8 +54,9 @@
|
||||
WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling"));
|
||||
WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
|
||||
WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
|
||||
+ WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch"));
|
||||
if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
||||
- WMSetButtonSelected(panel->swi[7], GetBoolForKey("AntialiasedText"));
|
||||
+ WMSetButtonSelected(panel->swi[8], GetBoolForKey("AntialiasedText"));
|
||||
}
|
||||
@@ -4131,8 +4133,11 @@
|
||||
handleClipChangeWorkspace(scr, event);
|
||||
else
|
||||
handleDockMove(dock, aicon, event);
|
||||
- } else
|
||||
- handleIconMove(dock, aicon, event);
|
||||
+ } else {
|
||||
+ Bool hasMoved = handleIconMove(dock, aicon, event);
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ iconDblClick(desc, event);
|
||||
+ }
|
||||
|
||||
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
|
||||
aicon==scr->clip_icon) {
|
||||
diff -urN WindowMaker-0.80.2/src/icon.c WindowMaker-0.80.2.modif/src/icon.c
|
||||
--- WindowMaker-0.80.2/src/icon.c 2002-02-21 12:28:48.000000000 +0100
|
||||
+++ WindowMaker-0.80.2.modif/src/icon.c 2002-12-09 09:04:53.000000000 +0100
|
||||
@@ -879,6 +879,7 @@
|
||||
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;
|
||||
@@ -930,6 +931,7 @@
|
||||
break;
|
||||
@@ -68,10 +69,10 @@
|
||||
panel->box = WMCreateBox(panel->parent);
|
||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||
|
||||
case MotionNotify:
|
||||
+ hasMoved = True;
|
||||
if (!grabbed) {
|
||||
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
|
||||
|| abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
|
||||
@@ -967,6 +969,8 @@
|
||||
- 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);
|
||||
+ WMMoveWidget(panel->swi[i], 20, 5+i*25);
|
||||
}
|
||||
|
||||
if (wPreferences.auto_arrange_icons)
|
||||
wArrangeIcons(wwin->screen_ptr, True);
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ miniwindowDblClick(desc, event);
|
||||
return;
|
||||
WMSetButtonText(panel->swi[0], _("Disable miniwindows (icons for miniaturized windows). For use with KDE/GNOME."));
|
||||
@@ -81,11 +82,11 @@
|
||||
WMSetButtonText(panel->swi[4], _("Use Windoze style cycling."));
|
||||
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[7], _("Launch applications and restore windows with a single click"));
|
||||
+ WMSetButtonText(panel->swi[8], _("Smooth font edges (needs restart)."));
|
||||
if (!WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
||||
- WMSetButtonEnabled(panel->swi[7], False);
|
||||
-
|
||||
+ WMSetButtonEnabled(panel->swi[8], False);
|
||||
+
|
||||
WMRealizeWidget(panel->box);
|
||||
WMMapSubwidgets(panel->box);
|
||||
|
||||
}
|
||||
diff -urN WindowMaker-0.80.2/src/WindowMaker.h WindowMaker-0.80.2.modif/src/WindowMaker.h
|
||||
--- WindowMaker-0.80.2/src/WindowMaker.h 2002-02-21 12:28:48.000000000 +0100
|
||||
+++ WindowMaker-0.80.2.modif/src/WindowMaker.h 2002-12-09 08:57:47.000000000 +0100
|
||||
@@ -107,8 +108,9 @@
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
|
||||
+ SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
|
||||
if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
|
||||
- SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "AntialiasedText");
|
||||
+ SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "AntialiasedText");
|
||||
}
|
||||
|
||||
|
||||
Binary files wm-a/contrib/.single_click.diff.swp and wm-c/contrib/.single_click.diff.swp differ
|
||||
diff -urN wm-a/src/WindowMaker.h wm-c/src/WindowMaker.h
|
||||
--- wm-a/src/WindowMaker.h 2003-01-16 18:30:48.000000000 -0500
|
||||
+++ wm-c/src/WindowMaker.h 2003-05-19 12:27:57.000000000 -0400
|
||||
@@ -464,6 +464,9 @@
|
||||
/* shading animation */
|
||||
signed char shade_speed;
|
||||
@@ -132,38 +75,127 @@ diff -urN WindowMaker-0.80.2/src/WindowMaker.h WindowMaker-0.80.2.modif/src/Wind
|
||||
int edge_resistance;
|
||||
char attract;
|
||||
|
||||
diff -urN WindowMaker-0.80.2/WPrefs.app/Expert.c WindowMaker-0.80.2.modif/WPrefs.app/Expert.c
|
||||
--- WindowMaker-0.80.2/WPrefs.app/Expert.c 2002-01-08 14:44:38.000000000 +0100
|
||||
+++ WindowMaker-0.80.2.modif/WPrefs.app/Expert.c 2002-12-09 08:56:09.000000000 +0100
|
||||
@@ -54,6 +54,7 @@
|
||||
WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling"));
|
||||
WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
|
||||
WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
|
||||
+ WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch"));
|
||||
diff -urN wm-a/src/appicon.c wm-c/src/appicon.c
|
||||
--- wm-a/src/appicon.c 2003-01-16 18:30:48.000000000 -0500
|
||||
+++ wm-c/src/appicon.c 2003-05-19 12:27:01.000000000 -0400
|
||||
@@ -585,6 +585,7 @@
|
||||
int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
|
||||
int ix, iy;
|
||||
int clickButton = event->xbutton.button;
|
||||
+ Bool hasMoved = False;
|
||||
Pixmap ghost = None;
|
||||
Window wins[2];
|
||||
Bool movingSingle = False;
|
||||
@@ -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) {
|
||||
@@ -801,7 +803,9 @@
|
||||
|
||||
if (wPreferences.auto_arrange_icons)
|
||||
wArrangeIcons(scr, True);
|
||||
-
|
||||
+
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ iconDblClick(desc, event);
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
diff -urN wm-a/src/defaults.c wm-c/src/defaults.c
|
||||
--- wm-a/src/defaults.c 2003-01-16 18:30:48.000000000 -0500
|
||||
+++ wm-c/src/defaults.c 2003-05-19 12:27:17.000000000 -0400
|
||||
@@ -547,6 +547,9 @@
|
||||
{"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
|
||||
diff -urN wm-a/src/dock.c wm-c/src/dock.c
|
||||
--- wm-a/src/dock.c 2003-02-28 07:42:17.000000000 -0500
|
||||
+++ wm-c/src/dock.c 2003-05-19 12:27:33.000000000 -0400
|
||||
@@ -3782,7 +3782,7 @@
|
||||
|
||||
|
||||
|
||||
-static void
|
||||
+static Bool
|
||||
handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
||||
{
|
||||
WScreen *scr = dock->screen_ptr;
|
||||
@@ -3798,6 +3798,7 @@
|
||||
int tmp;
|
||||
Pixmap ghost = None;
|
||||
Bool docked;
|
||||
+ Bool hasMoved = False;
|
||||
int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
|
||||
int omnipresent = aicon->omnipresent; /* this must be cached!!! */
|
||||
|
||||
@@ -3852,6 +3853,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) {
|
||||
@@ -4001,7 +4003,7 @@
|
||||
#ifdef DEBUG
|
||||
puts("End icon move");
|
||||
#endif
|
||||
- return;
|
||||
+ return hasMoved;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4140,8 +4142,11 @@
|
||||
handleClipChangeWorkspace(scr, event);
|
||||
else
|
||||
handleDockMove(dock, aicon, event);
|
||||
- } else
|
||||
- handleIconMove(dock, aicon, event);
|
||||
+ } else {
|
||||
+ Bool hasMoved = handleIconMove(dock, aicon, event);
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ iconDblClick(desc, event);
|
||||
+ }
|
||||
|
||||
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
|
||||
aicon==scr->clip_icon) {
|
||||
diff -urN wm-a/src/icon.c wm-c/src/icon.c
|
||||
--- wm-a/src/icon.c 2003-01-16 18:30:49.000000000 -0500
|
||||
+++ wm-c/src/icon.c 2003-05-19 12:27:44.000000000 -0400
|
||||
@@ -878,7 +878,8 @@
|
||||
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;
|
||||
|
||||
@@ -66,7 +67,7 @@
|
||||
panel->box = WMCreateBox(panel->parent);
|
||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||
@@ -929,6 +930,7 @@
|
||||
break;
|
||||
|
||||
- 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], _("Use Windoze style cycling."));
|
||||
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], _("Launch applications and restore windows with a single click"));
|
||||
case MotionNotify:
|
||||
+ hasMoved = True;
|
||||
if (!grabbed) {
|
||||
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
|
||||
|| abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
|
||||
@@ -966,6 +968,8 @@
|
||||
|
||||
WMRealizeWidget(panel->box);
|
||||
WMMapSubwidgets(panel->box);
|
||||
@@ -101,6 +103,7 @@
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
|
||||
+ SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
|
||||
}
|
||||
if (wPreferences.auto_arrange_icons)
|
||||
wArrangeIcons(wwin->screen_ptr, True);
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ miniwindowDblClick(desc, event);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user