From b2d20dc7a52ddc86fbf5a9144c0d9c845d374f4b Mon Sep 17 00:00:00 2001 From: speedie Date: Wed, 7 Dec 2022 19:15:25 +0100 Subject: [PATCH] few small changes to systray toggle --- bar/systray.c | 2 ++ speedwm.c | 15 ++++----------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/bar/systray.c b/bar/systray.c index 722ffc7..599da91 100644 --- a/bar/systray.c +++ b/bar/systray.c @@ -22,6 +22,8 @@ draw_systray(Bar *bar, BarDrawArg *a) if (selmon->hidesystray) { if (systray) XMoveWindow(dpy, systray->win, -500, bar->by); + + return 0; } XSetWindowAttributes wa; diff --git a/speedwm.c b/speedwm.c index eca84f2..ffb69d3 100644 --- a/speedwm.c +++ b/speedwm.c @@ -5495,22 +5495,15 @@ togglebar(const Arg *arg) void togglesystray(const Arg *arg) { - Bar *bar; - Client *c; - selmon->hidesystray = !selmon->hidesystray; - + /* - if (selmon->hidesystray) { + if (selmon->hidesystray) removesystrayicon(systray->icons); - //XUnmapWindow(dpy, systray->win); - //XDestroyWindow(dpy, systray->win); - free(systray); - } - */ + */ updatebarpos(selmon); - arrange(selmon); + updatestatus(); } #endif