Changeset 3c8c580 in mainline for uspace/lib/ui/src/menuentry.c


Ignore:
Timestamp:
2021-06-10T13:22:33Z (3 years ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c68c18b9
Parents:
d091007
git-author:
Jiri Svoboda <jiri@…> (2021-05-20 15:34:03)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-06-10 13:22:33)
Message:

Open menu in separate popup window (WIP)

File:
1 edited

Legend:

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

    rd091007 r3c8c580  
    203203        ui_resource_t *res;
    204204
     205        /*
     206         * This needs to work even if the menu is not open, so we cannot
     207         * use the menu's resource, which is only created after the menu
     208         * is open (and its window is created). Use the menu bar's
     209         * resource instead.
     210         */
    205211        res = mentry->menu->mbar->res;
    206212
     
    223229        gfx_coord_t width;
    224230
     231        /*
     232         * This needs to work even if the menu is not open, so we cannot
     233         * use the menu's resource, which is only created after the menu
     234         * is open (and its window is created). Use the menu bar's
     235         * resource instead.
     236         */
    225237        res = menu->mbar->res;
    226238
     
    256268        gfx_coord_t vpad;
    257269
     270        /*
     271         * This needs to work even if the menu is not open, so we cannot
     272         * use the menu's resource, which is only created after the menu
     273         * is open (and its window is created). Use the menu bar's
     274         * resource instead.
     275         */
    258276        res = mentry->menu->mbar->res;
    259277
     
    294312        errno_t rc;
    295313
    296         res = mentry->menu->mbar->res;
     314        res = ui_menu_get_res(mentry->menu);
    297315
    298316        ui_menu_entry_get_geom(mentry, pos, &geom);
     
    379397        if (mentry->inside) {
    380398                /* Close menu */
    381                 ui_menu_bar_select(mentry->menu->mbar,
    382                     &mentry->menu->mbar->sel_pos, NULL);
     399                ui_menu_bar_select(mentry->menu->mbar, NULL, NULL);
    383400
    384401                /* Call back */
     
    487504        gfx_coord_t width;
    488505
    489         res = mentry->menu->mbar->res;
     506        res = ui_menu_get_res(mentry->menu);
    490507
    491508        if (res->textmode) {
Note: See TracChangeset for help on using the changeset viewer.