From b3c20610e9f43ab71152738d4c20fe388e70052d Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Mon, 8 Dec 2014 22:42:41 +0100 Subject: [PATCH] wmaker: remove parameter 'which' from local function 'restoreMenu' This parameter is given always the same value, so there is not reason to keep it. The code is updated to take this value into account, and the related constants are removed. Signed-off-by: Christophe CURIS --- src/menu.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/menu.c b/src/menu.c index e573b395..8322dbb1 100644 --- a/src/menu.c +++ b/src/menu.c @@ -56,10 +56,6 @@ /***** Local Stuff ******/ -#define WSS_ROOTMENU (1<<0) -#define WSS_SWITCHMENU (1<<1) -#define WSS_WSMENU (1<<2) - static struct { int steps; int delay; @@ -2382,7 +2378,7 @@ static Bool getMenuInfo(WMPropList * info, int *x, int *y, Bool * lowered) return True; } -static int restoreMenu(WScreen * scr, WMPropList * menu, int which) +static int restoreMenu(WScreen *scr, WMPropList *menu) { int x, y; Bool lowered = False; @@ -2394,10 +2390,8 @@ static int restoreMenu(WScreen * scr, WMPropList * menu, int which) if (!getMenuInfo(menu, &x, &y, &lowered)) return False; - if (which & WSS_SWITCHMENU) { - OpenSwitchMenu(scr, x, y, False); - pmenu = scr->switch_menu; - } + OpenSwitchMenu(scr, x, y, False); + pmenu = scr->switch_menu; if (pmenu) { int width = MENUW(pmenu); @@ -2508,7 +2502,7 @@ void wMenuRestoreState(WScreen * scr) skey = WMCreatePLString("SwitchMenu"); menu = WMGetFromPLDictionary(menus, skey); WMReleasePropList(skey); - restoreMenu(scr, menu, WSS_SWITCHMENU); + restoreMenu(scr, menu); if (!scr->root_menu) { OpenRootMenu(scr, scr->scr_width * 2, 0, False); -- 2.11.4.GIT