From 2d038c02291555550cbf1494ec46e6b2c5d4c577 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 11 Jun 2007 03:39:54 +0000 Subject: [PATCH] clicking the active window iconifies it --- rspanel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rspanel.c b/rspanel.c index 6cbd19c..36c5d30 100644 --- a/rspanel.c +++ b/rspanel.c @@ -374,7 +374,11 @@ static void handle_press(int x, int y, int button, Time time) { switch (button) { case 1: - netwm_action(tk->win, _NET_ACTIVE_WINDOW, time, 0); + if (tk->focused) /* iconify if focused */ + netwm_action(tk->win, _NET_WM_STATE_HIDDEN, + time, XPROP_ADD); + else + netwm_action(tk->win, _NET_ACTIVE_WINDOW, time, 0); break; case 2: if (tk->iconified) -- 2.39.2