localize menu routines

Keep state loal into drag_menu() in menu.c, rather than in global
variables around menu.c and main.c
This commit is contained in:
Lucas de Sena
2026-02-22 13:13:22 +00:00
parent 9354a98208
commit 599f0a17b3
3 changed files with 71 additions and 100 deletions

View File

@@ -19,7 +19,6 @@ extern struct Library *XLibBase;
extern Display *dpy;
extern XContext client_context, screen_context;
extern Client *activeclient;
extern Scrn *menuactive;
extern void setfocus(Window);
Client *clients=NULL;
@@ -322,8 +321,6 @@ void rmclient(Client *c)
closescreen();
scr = c->scr;
if(c->active) {
if(!menuactive)
setfocus(None);
c->active=False;
activeclient = NULL;
XInstallColormap(dpy, scr->cmap);