[amiwm] Do another pass to clean up build warnings

This is mostly a "dangling if" cleanup, but I did add some other
comments here and there!
This commit is contained in:
Adrian Chadd
2022-02-10 11:11:05 -08:00
parent 59eae9c029
commit 5365f97cbe
20 changed files with 2077 additions and 4411 deletions

12
menu.c
View File

@@ -46,6 +46,7 @@ extern void select_all_icons(Scrn *i);
extern void mod_menuselect(struct module *, int, int, int);
extern void setfocus(Window);
extern void flushmodules();
extern void wberror(Scrn *, char *);
Scrn *mbdclick=NULL, *mbdscr=NULL;
@@ -361,7 +362,8 @@ void redraw_item(struct Item *i, Window w)
void createmenubar()
{
XSetWindowAttributes attr;
struct Menu *m, *sm1, *sm2, *sm3;
struct Menu *m, *sm1;
// struct Menu *sm2, *sm3;
struct ToolItem *ti;
GC gc;
@@ -575,11 +577,13 @@ static void leave_item(struct Item *i, Window w)
{
if(i==activesubitem)
activesubitem=NULL;
if(i==activeitem)
if(activesubmenu && i->sub==activesubmenu)
if(i==activeitem) {
if(activesubmenu && i->sub==activesubmenu) {
return;
else
} else {
activeitem=NULL;
}
}
XSetWindowBackground(dpy, i->win, scr->dri.dri_Pens[BARBLOCKPEN]);
XClearWindow(dpy, i->win);
redraw_item(i, i->win);