aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharlie Root <John Ankarstr\xf6m>2021-06-01 16:41:45 +0200
committerJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-01 16:42:52 +0200
commite5377b0df3382bf8b0149c2e59568ea08a85e80f (patch)
tree43edbb3e9246914a9e631eae57356b117b9bfc99 /src
parentf60e475e92886bc8f30617884078ebf4489c6711 (diff)
downloadjwm-e5377b0df3382bf8b0149c2e59568ea08a85e80f.tar.gz
Double-click to shade
I more often want to temporarily get rid of windows than maximize them.
Diffstat (limited to 'src')
-rw-r--r--src/event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/event.c b/src/event.c
index a1cc943..76a9fff 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1102,7 +1102,10 @@ void DispatchBorderButtonEvent(const XButtonEvent *event, ClientNode *np) {
&& abs(event->time - lastClickTime) <= doubleClickSpeed
&& abs(event->x - lastX) <= doubleClickDelta
&& abs(event->y - lastY) <= doubleClickDelta) {
- MaximizeClient(np);
+ if(np->state.status & STAT_SHADED)
+ UnshadeClient(np);
+ else
+ ShadeClient(np);
doubleClickActive = 0;
} else {
if(MoveClient(np, event->x, event->y)) {