Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70709 - x11-wm/windowmaker: feature request for wlist patch and singleclick patch
Summary: x11-wm/windowmaker: feature request for wlist patch and singleclick patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Armando Di Cianno (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-10 14:11 UTC by Chris
Modified: 2005-03-17 15:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2004-11-10 14:11:02 UTC
I am requesting the addition of the wlist patch from windowmaker 0.80.2 be applied to the windowmaker 0.91.0.  It works without any adjustment needed.  I also request my updated version of the single click patch be included in the ebuild.  I derived this patch from the 0.80.2 patch.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




This is the single-click patch:

--- WindowMaker-0.91.0/WPrefs.app/Expert.c	2004-10-22 23:04:38.000000000 -0400
+++ WindowMaker-0.91.0fpo1/Wprefs.app/Expert.c	2004-10-29 16:37:39.000000000 -0400
@@ -33,7 +33,7 @@
 
     WMWidget *parent;
 
-    WMButton *swi[8];
+    WMButton *swi[10];
 
 } _Panel;
 
@@ -54,6 +54,8 @@
     WMSetButtonSelected(panel->swi[4], GetBoolForKey("DontConfirmKill"));
     WMSetButtonSelected(panel->swi[5], GetBoolForKey("DisableBlinking"));
     WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText"));
+    WMSetButtonSelected(panel->swi[7], GetBoolForKey("DCMaximize"));
+    WMSetButtonSelected(panel->swi[8], GetBoolForKey("SingleClickLaunch"));
 }
 
 
@@ -66,10 +68,10 @@
     panel->box = WMCreateBox(panel->parent);
     WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
 
-    for (i=0; i<7; 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, 20+i*23);
     }
 
     WMSetButtonText(panel->swi[0], _("Disable miniwindows (icons for minimized
windows). For use with KDE/GNOME."));
@@ -79,7 +81,9 @@
     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], _("Double click on title bar maximize"));
+    WMSetButtonText(panel->swi[8], _("Launch applications and restore windows
with a single click"));
+ 
     WMSetButtonEnabled(panel->swi[6], True);
 
     WMRealizeWidget(panel->box);
@@ -103,6 +107,8 @@
     SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DontConfirmKill");
     SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking");
     SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText");
+    SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "DCMaximize");
+    SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "SingleClickLaunch");
 }
 
 
--- WindowMaker-0.91.0/src/WindowMaker.h	2004-10-24 21:48:39.000000000 -0400
+++ WindowMaker-0.91.0fpo1/src/WindowMaker.h	2004-10-29 16:40:42.000000000 -0400
@@ -465,6 +465,12 @@
 
     /* shading animation */
     signed char shade_speed;
+ 
+    /* double click on title bar maximize */
+    char dc_maximize;
+
+    /* single click to lauch applications */
+    char single_click;
 
     int edge_resistance;
     char attract;
--- WindowMaker-0.91.0/src/appicon.c	2004-10-14 13:31:49.000000000 -0400
+++ WindowMaker-0.91.0fpo1/src/appicon.c	2004-10-29 16:50:00.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,6 +803,8 @@
 
             if (wPreferences.auto_arrange_icons)
                 wArrangeIcons(scr, True);
+                 if (!hasMoved && wPreferences.single_click)
+		iconDblClick(desc, event);
 
             done = 1;
             break;
--- WindowMaker-0.91.0/src/def_pixmaps.h	2004-10-12 13:54:26.000000000 -0400
+++ WindowMaker-0.91.0fpo1/src/def_pixmaps.h	2004-10-29 16:54:08.000000000 -0400
@@ -86,15 +86,15 @@
     ". c #000000",
     "# c None",
     "..........",
-    "..........",
-    "..........",
-    ".########.",
-    ".########.",
-    ".########.",
-    ".########.",
-    ".########.",
-    ".########.",
-    ".........."
+    ".........#",
+    "........##",
+    ".......###",
+    "......####",
+    ".....#####",
+    "....######",
+    "...#######",
+    "..########",
+    ".#########"
 };
 
 #ifdef XKB_BUTTON_HINT
--- WindowMaker-0.91.0/src/defaults.c	2004-10-25 21:13:50.000000000 -0400
+++ WindowMaker-0.91.0fpo1/src/defaults.c	2004-10-29 16:56:20.000000000 -0400
@@ -556,6 +556,12 @@
     {"DisableBlinking",	"NO",		NULL,
     &wPreferences.dont_blink,	getBool,	NULL
     },
+    {"DCMaximize", "NO",		NULL,
+	   &wPreferences.dc_maximize,	getBool,	NULL
+    },
+    {"SingleClickLaunch", "NO",		NULL,
+	   &wPreferences.single_click,	getBool,	NULL
+    },
     /* style options */
     {"MenuStyle", 	"normal",  		seMenuStyles,
     &wPreferences.menu_style, getEnum, 	setMenuStyle
--- WindowMaker-0.91.0/src/dock.c	2004-10-22 23:10:40.000000000 -0400
+++ WindowMaker-0.91.0fpo1/src/dock.c	2004-10-29 17:04:46.000000000 -0400
@@ -3758,7 +3758,7 @@
 
 
 
-static void
+static Bool
 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
 {
     WScreen *scr = dock->screen_ptr;
@@ -3774,6 +3774,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!!! */
 
@@ -3828,6 +3829,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 +3979,7 @@
 #ifdef DEBUG
             puts("End icon move");
 #endif
-            return;
+            return hasMoved;
         }
     }
 }
@@ -4116,8 +4118,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) {
--- WindowMaker-0.91.0/src/icon.c	2004-10-16 18:16:21.000000000 -0400
+++ WindowMaker-0.91.0fpo1/src/icon.c	2004-10-29 17:08:33.000000000 -0400
@@ -891,6 +891,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;
@@ -942,6 +943,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 +981,9 @@
 
             if (wPreferences.auto_arrange_icons)
                 wArrangeIcons(wwin->screen_ptr, True);
+		if (!hasMoved && wPreferences.single_click)
+		miniwindowDblClick(desc, event);
+
             return;
 
         }
--- WindowMaker-0.91.0/src/window.c	2004-10-22 23:11:10.000000000 -0400
+++ WindowMaker-0.91.0fpo1/src/window.c	2004-10-29 18:15:52.000000000 -0400
@@ -3099,13 +3099,28 @@
     event->xbutton.state &= ValidModMask;
 
     if (event->xbutton.button==Button1) {
-        if (event->xbutton.state == 0) {
-            if (!WFLAGP(wwin, no_shadeable)) {
-                /* shade window */
-                if (wwin->flags.shaded)
-                    wUnshadeWindow(wwin);
-                else
-                    wShadeWindow(wwin);
+  if (event->xbutton.state == 0) {
+        /* check preferences, maximize or shade */
+            if (wPreferences.dc_maximize) {
+		if (!WFLAGP(wwin, no_resizable)) {
+		    /* maximize window */
+		    if (wwin->flags.maximized != 0) {
+		    	wUnmaximizeWindow(wwin);
+                        wwin->flags.maximized = 0;
+                    }
+		    else {
+		    	wMaximizeWindow(wwin, MAX_VERTICAL|MAX_HORIZONTAL);
+                        wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
+                    }
+	    	}
+	    } else {
+	        if (!WFLAGP(wwin, no_shadeable)) {
+		    /* shade window */
+		    if (wwin->flags.shaded)
+		        wUnshadeWindow(wwin);
+		    else
+		        wShadeWindow(wwin);
+	        }
             }
         } else {
             int dir = 0;
Comment 1 Aaron Walker (RETIRED) gentoo-dev 2004-11-11 07:19:10 UTC
Please use bugzilla's file attachment feature for patches.
Comment 2 Armando Di Cianno (RETIRED) gentoo-dev 2005-01-05 16:26:40 UTC
seems I maintain windowmaker now ;-) reassigning
Comment 3 Armando Di Cianno (RETIRED) gentoo-dev 2005-03-17 15:02:35 UTC
patches have been added to windowmaker-0.91.0-r3; bug fixed