Changeset 0da03df in mainline for uspace/srv/hid/display/seat.c
- Timestamp:
- 2020-12-10T10:27:07Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 442210e
- Parents:
- 08f345f
- git-author:
- Jiri Svoboda <jiri@…> (2020-12-09 18:26:57)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-12-10 10:27:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/seat.c
r08f345f r0da03df 128 128 } 129 129 130 /** Switch focus to another window. 131 * 132 * @param seat Seat 133 * @param wnd Window to evacuate focus from 134 */ 135 void ds_seat_switch_focus(ds_seat_t *seat) 136 { 137 ds_window_t *nwnd; 138 139 if (seat->focus != NULL) 140 nwnd = ds_display_prev_window(seat->focus); 141 else 142 nwnd = NULL; 143 144 if (nwnd == NULL) 145 nwnd = ds_display_last_window(seat->display); 146 147 if (nwnd != NULL) 148 ds_seat_set_focus(seat, nwnd); 149 } 150 130 151 /** Post keyboard event to the seat's focused window. 131 152 * … … 143 164 if (event->type == KEY_PRESS && alt_or_shift && event->key == KC_TAB) { 144 165 /* On Alt-Tab or Shift-Tab, switch focus to next window */ 145 ds_seat_ evac_focus(seat, seat->focus);166 ds_seat_switch_focus(seat); 146 167 return EOK; 147 168 } … … 389 410 390 411 wnd = ds_display_window_by_pos(seat->display, &seat->pntpos); 391 392 if (seat->focus != wnd) { 412 if (seat->focus != wnd && seat->focus != NULL) { 393 413 rc = ds_window_post_pos_event(seat->focus, event); 394 414 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.