mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
fixed a bug with workspace switching
This commit is contained in:
@@ -178,7 +178,7 @@ menuIndexForWindow(WMenu *menu, WWindow *wwin, int old_pos)
|
||||
{
|
||||
int idx;
|
||||
|
||||
if (menu->entry_no == 0)
|
||||
if (menu->entry_no <= old_pos)
|
||||
return -1;
|
||||
|
||||
#define WS(i) ((WWindow*)menu->entries[i]->clientdata)->frame->workspace
|
||||
@@ -326,12 +326,12 @@ UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action)
|
||||
it = entry->flags.indicator_type;
|
||||
ion = entry->flags.indicator_on;
|
||||
|
||||
wMenuRemoveItem(switchmenu, i);
|
||||
|
||||
if (!IS_OMNIPRESENT(wwin) && idx < 0) {
|
||||
idx = menuIndexForWindow(switchmenu, wwin, i);
|
||||
}
|
||||
|
||||
wMenuRemoveItem(switchmenu, i);
|
||||
|
||||
entry = wMenuInsertCallback(switchmenu, idx, t,
|
||||
focusWindow, wwin);
|
||||
wfree(t);
|
||||
|
||||
Reference in New Issue
Block a user