1
0
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:
kojima
2004-10-19 02:37:58 +00:00
parent 7908c9a66b
commit 6cd91272a6
6 changed files with 24 additions and 41 deletions

View File

@@ -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);