Changeset 5de852c in mainline for uspace/app/calculator/calculator.c


Ignore:
Timestamp:
2022-01-11T13:12:15Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bfc0fc6
Parents:
59768c7
git-author:
Jiri Svoboda <jiri@…> (2022-01-10 20:11:54)
git-committer:
Jiri Svoboda <jiri@…> (2022-01-11 13:12:15)
Message:

Coordinate keyboard event delivery between application and UI framework

If an application sets its own keyboard event handler, it needs to call
ui_window_def_kbd() to deliver events to the window's UI control tree.
Menubar should be able to capture these events so that they are not
accidentally acted upon by the application keyboard handler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/calculator/calculator.c

    r59768c7 r5de852c  
    186186        calc_t *calc = (calc_t *) arg;
    187187
     188        if (ui_window_def_kbd(window, event) == ui_claimed)
     189                return;
     190
    188191        if (event->type == KEY_PRESS && (event->mods & KM_CTRL) != 0) {
    189192                switch (event->key) {
Note: See TracChangeset for help on using the changeset viewer.