On Sat, May 23, 2009 at 09:03:11PM +0200, Samir SAADA wrote:
> The "hide other" behavior seems counter instinctive now.
> I think we should keep the mod+wheelDown. Like it was.
Ok, that's reasonable. Try the attached patch.
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 2004-10-14 21:31:49.000000000 +0400
+++ WindowMaker-0.92.0/src/appicon.c 2009-05-23 23:29:02.000000000 +0400
@@ -554,16 +554,22 @@
}
#endif
- unhideHere = (event->xbutton.state & ShiftMask);
+ if (event->xbutton.button == Button5
+ && !(event->xbutton.state & MOD_MASK)) {
+ if (!wapp->flags.hidden)
+ wHideApplication(wapp);
+ } else {
+ unhideHere = (event->xbutton.state & ShiftMask);
+
+ /* go to the last workspace that the user worked on the app */
+ if (!unhideHere && wapp->last_workspace != scr->current_workspace)
+ wWorkspaceChange(scr, wapp->last_workspace);
- /* go to the last workspace that the user worked on the app */
- if (!unhideHere && wapp->last_workspace != scr->current_workspace)
- wWorkspaceChange(scr, wapp->last_workspace);
+ wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
- wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
-
- if (event->xbutton.state & MOD_MASK) {
- wHideOtherApplications(aicon->icon->owner);
+ 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 2004-10-23 07:10:40.000000000 +0400
+++ WindowMaker-0.92.0/src/dock.c 2009-05-23 23:29:02.000000000 +0400
@@ -3564,18 +3564,24 @@
assert(wapp!=NULL);
- unhideHere = (event->xbutton.state & ShiftMask);
+ if (event->xbutton.button == Button5
+ && !(event->xbutton.state & MOD_MASK)) {
+ if (!wapp->flags.hidden)
+ wHideApplication(wapp);
+ } else {
+ unhideHere = (event->xbutton.state & ShiftMask);
- /* go to the last workspace that the user worked on the app */
- if (wapp->last_workspace != dock->screen_ptr->current_workspace
- && !unhideHere) {
- wWorkspaceChange(dock->screen_ptr, wapp->last_workspace);
- }
+ /* go to the last workspace that the user worked on the app */
+ if (wapp->last_workspace != dock->screen_ptr->current_workspace
+ && !unhideHere) {
+ wWorkspaceChange(dock->screen_ptr, wapp->last_workspace);
+ }
- wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
+ wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);
- if (event->xbutton.state & MOD_MASK) {
- wHideOtherApplications(btn->icon->owner);
+ if (event->xbutton.state & MOD_MASK) {
+ wHideOtherApplications(btn->icon->owner);
+ }
}
} else {
if (event->xbutton.button==Button1) {