Hi,

please consider including the functionality implemented by the
attached simple patch:

    button5 (wheel-down) on an appicon hides the application(s)

besides being useful, it is also consistent with what
button4/button5 do when used on a window title (shade/unshade).
diff -ru WindowMaker-0.92.0.orig/src/appicon.c WindowMaker-0.92.0/src/appicon.c
--- WindowMaker-0.92.0.orig/src/appicon.c	Thu Oct 14 21:31:49 2004
+++ WindowMaker-0.92.0/src/appicon.c	Sat Feb  9 15:16:27 2008
@@ -560,7 +560,12 @@
     if (!unhideHere && wapp->last_workspace != scr->current_workspace)
         wWorkspaceChange(scr, wapp->last_workspace);
 
-    wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
+    if (event->xbutton.button == Button5) {
+	if (!wapp->flags.hidden)
+	    wHideApplication(wapp);
+    }
+    else
+	wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
 
     if (event->xbutton.state & MOD_MASK) {
         wHideOtherApplications(aicon->icon->owner);
diff -ru WindowMaker-0.92.0.orig/src/dock.c WindowMaker-0.92.0/src/dock.c
--- WindowMaker-0.92.0.orig/src/dock.c	Sat Oct 23 07:10:40 2004
+++ WindowMaker-0.92.0/src/dock.c	Sat Feb  9 15:29:16 2008
@@ -3572,7 +3572,13 @@
             wWorkspaceChange(dock->screen_ptr, wapp->last_workspace);
         }
 
-        wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
+	if (event->xbutton.button == Button5) {
+	    if (!wapp->flags.hidden)
+		wHideApplication(wapp);
+	}
+	else
+	    wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
+
 
         if (event->xbutton.state & MOD_MASK) {
             wHideOtherApplications(btn->icon->owner);

Reply via email to