From 0aa3e7d08d83b487beb552501005df507b1ac0f8 Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 29 Dec 2017 12:54:54 +0000 Subject: add helper function client_show to bring together like actions for unhide/raise --- client.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'client.c') diff --git a/client.c b/client.c index dcc4afc..a9776b0 100644 --- a/client.c +++ b/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.242 2017/12/22 21:21:44 okan Exp $ + * $OpenBSD: client.c,v 1.243 2017/12/29 12:54:54 okan Exp $ */ #include @@ -531,6 +531,15 @@ client_hide(struct client_ctx *cc) client_set_wm_state(cc, IconicState); } +void +client_show(struct client_ctx *cc) +{ + if (cc->flags & CLIENT_HIDDEN) + client_unhide(cc); + else + client_raise(cc); +} + void client_unhide(struct client_ctx *cc) { -- cgit v1.2.3-2-gb3c3