On Sat, 20 Feb 2016, Okan Demirmen wrote: > On Sat 2016.02.20 at 12:29 -0500, Martin Brandenburg wrote: > > This avoids an empty square in the upper left corner if > > there is nothing to display in some menu the user > > requests. > > Sorry, but I think that is a big hammer; in fact there is evidence of > why these checks are no longer there in the calling functions, such as: > > ---------------------------- > revision 1.89 > date: 2015/06/07 19:10:00; author: okan; state: Exp; lines: +1 -7; > commitid: DuQBUgWvLWBQOJbB; > even if the menuq is empty, at least show an empty menu instead of just > bailing making it look like the binding isn't working. > ---------------------------- > > So if your application menu is empty, do you want to see the > 'application' header with an empty list below it, or zero indication > (not even the header) that anything is working (or is it but empty?)?
No I still see that with my patch. E.g. M-? brings an empty (really one item) menu that says "exec." I don't see any menu at all for e.g. left clicking when there are no hidden windows. I don't think I should. What I describe below hardly demonstrates that anything is working. Is there another sort of menu I'm not thinking of? I'll admit to not using all of cwm's features. > > ..that's the rationale at least. > > OR, is this empty square something else -what (empty) menu do you see > just an empty square with no indicator/header in it? If the border is set to 1px, you will see a 3px square in the upper corner With a larger border it looks like http://www.martinbrandenburg.com/2016/ss/0222.cwm.png I wouldn't have noticed if I wasn't playing with border width one day. -- Martin > > Thanks, > Okan > > > -- Martin > > > > Index: menu.c > > =================================================================== > > RCS file: /cvs/xenocara/app/cwm/menu.c,v > > retrieving revision 1.89 > > diff -u -p -r1.89 menu.c > > --- menu.c 11 Nov 2015 14:22:01 -0000 1.89 > > +++ menu.c 20 Feb 2016 17:26:17 -0000 > > @@ -89,6 +89,9 @@ menu_filter(struct screen_ctx *sc, struc > > int evmask, focusrevert; > > int xsave, ysave, xcur, ycur; > > > > + if (TAILQ_EMPTY(menuq)) > > + return NULL; > > + > > TAILQ_INIT(&resultq); > > > > (void)memset(&mc, 0, sizeof(mc)); > > >