Changeset 5d380b6 in mainline for uspace/lib/ui/test/menu.c


Ignore:
Timestamp:
2023-01-20T11:50:41Z (23 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1f0a14
Parents:
6828a56
git-author:
Jiri Svoboda <jiri@…> (2023-01-20 19:50:21)
git-committer:
Jiri Svoboda <jiri@…> (2023-01-20 11:50:41)
Message:

Create menu windows in the correct seat

Add a mechanism to set the seat of a new display window, UI window,
UI popup - input device ID. This is set to the ID of the device which
activated the menu (mouse, keyboard). The display server determines
the correct seat from there.

This makes sure clicking outside closes the correct pop-up window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/menu.c

    r6828a56 r5d380b6  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2023 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    293293
    294294        /* Open and close */
    295         rc = ui_menu_open(menu, &prect);
     295        rc = ui_menu_open(menu, &prect, 0);
    296296        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    297297
     
    341341        PCUT_ASSERT_FALSE(open);
    342342
    343         rc = ui_menu_open(menu, &prect);
     343        rc = ui_menu_open(menu, &prect, 0);
    344344        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    345345
     
    393393
    394394        /* Menu needs to be open to be able to paint it */
    395         rc = ui_menu_open(menu, &prect);
     395        rc = ui_menu_open(menu, &prect, 0);
    396396        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    397397
     
    442442
    443443        /* Menu needs to be open to be able to paint it */
    444         rc = ui_menu_open(menu, &prect);
     444        rc = ui_menu_open(menu, &prect, 0);
    445445        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    446446
     
    491491
    492492        /* Menu needs to be open to be able to paint it */
    493         rc = ui_menu_open(menu, &prect);
     493        rc = ui_menu_open(menu, &prect, 0);
    494494        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    495495
     
    539539
    540540        /* Menu needs to be open to be able to move around it */
    541         rc = ui_menu_open(menu, &prect);
     541        rc = ui_menu_open(menu, &prect, 0);
    542542        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    543543
     
    599599
    600600        /* Menu needs to be open to be able to move around it */
    601         rc = ui_menu_open(menu, &prect);
     601        rc = ui_menu_open(menu, &prect, 0);
    602602        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    603603
     
    655655
    656656        /* Menu needs to be open to be able to move around it */
    657         rc = ui_menu_open(menu, &prect);
     657        rc = ui_menu_open(menu, &prect, 0);
    658658        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    659659
     
    715715
    716716        /* Menu needs to be open to be able to move around it */
    717         rc = ui_menu_open(menu, &prect);
     717        rc = ui_menu_open(menu, &prect, 0);
    718718        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    719719
Note: See TracChangeset for help on using the changeset viewer.