Changeset 5d9403d5 in mainline for uspace/app/taskbar/taskbar.c
- Timestamp:
- 2023-10-13T20:27:14Z (19 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7aa9fa1b
- Parents:
- 788c76e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskbar/taskbar.c
r788c76e3 r5d9403d5 49 49 50 50 static void taskbar_wnd_close(ui_window_t *, void *); 51 static void taskbar_wnd_kbd(ui_window_t *, void *, kbd_event_t *); 51 52 static void taskbar_wnd_pos(ui_window_t *, void *, pos_event_t *); 52 53 53 54 static ui_window_cb_t window_cb = { 54 55 .close = taskbar_wnd_close, 56 .kbd = taskbar_wnd_kbd, 55 57 .pos = taskbar_wnd_pos 56 58 }; … … 66 68 67 69 ui_quit(taskbar->ui); 70 } 71 72 /** Window received keyboard event. 73 * 74 * @param window Window 75 * @param arg Argument (taskbar) 76 * @param event Keyboard event 77 */ 78 static void taskbar_wnd_kbd(ui_window_t *window, void *arg, kbd_event_t *event) 79 { 80 taskbar_t *taskbar = (taskbar_t *) arg; 81 ui_evclaim_t claim; 82 83 /* Remember ID of device that sent the last event */ 84 taskbar->wndlist->ev_idev_id = event->kbd_id; 85 taskbar->tbsmenu->ev_idev_id = event->kbd_id; 86 87 claim = ui_window_def_kbd(window, event); 88 if (claim == ui_claimed) 89 return; 90 91 if (event->type == KEY_PRESS && (event->mods & KM_CTRL) == 0 && 92 (event->mods & KM_ALT) == 0 && (event->mods & KM_SHIFT) == 0 && 93 event->key == KC_ENTER) { 94 if (!tbsmenu_is_open(taskbar->tbsmenu)) 95 tbsmenu_open(taskbar->tbsmenu); 96 } 68 97 } 69 98 … … 79 108 80 109 /* Remember ID of device that sent the last event */ 81 taskbar->wndlist->ev_pos_id = event->pos_id; 110 taskbar->wndlist->ev_idev_id = event->pos_id; 111 taskbar->tbsmenu->ev_idev_id = event->pos_id; 82 112 83 113 ui_window_def_pos(window, event);
Note:
See TracChangeset
for help on using the changeset viewer.