Changeset bfc0fc6 in mainline


Ignore:
Timestamp:
2022-01-11T13:16:22Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b9a30fa
Parents:
5de852c
git-author:
Jiri Svoboda <jiri@…> (2022-01-10 20:16:04)
git-committer:
Jiri Svoboda <jiri@…> (2022-01-11 13:16:22)
Message:

ui_menu_bar_left/right() must not switch to the same menu

If there is a single menu, ui_menu_bar_select() would then close
the current menu, rather than doing nothing. Fixes left/right
behavior in Navigator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/menubar.c

    r5de852c rbfc0fc6  
    295295                nmenu = ui_menu_last(mbar);
    296296
    297         ui_menu_bar_select(mbar, nmenu, false);
     297        if (nmenu != mbar->selected)
     298                ui_menu_bar_select(mbar, nmenu, false);
    298299}
    299300
     
    316317                nmenu = ui_menu_first(mbar);
    317318
    318         ui_menu_bar_select(mbar, nmenu, false);
     319        if (nmenu != mbar->selected)
     320                ui_menu_bar_select(mbar, nmenu, false);
    319321}
    320322
Note: See TracChangeset for help on using the changeset viewer.