Changeset 17c0f5d in mainline for uspace/srv/hid/display/seat.c
- Timestamp:
- 2023-01-05T19:28:22Z (16 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ededdc4
- Parents:
- 5d86797
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/seat.c
r5d86797 r17c0f5d 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 142 142 * 143 143 * @param seat Seat 144 * @param wnd Window to evacuate focus from144 * @param wnd Window to evacuate references from 145 145 */ 146 146 void ds_seat_evac_wnd_refs(ds_seat_t *seat, ds_window_t *wnd) … … 160 160 if (seat->popup == wnd) 161 161 ds_seat_set_popup(seat, NULL); 162 } 163 164 /** Unfocus window. 165 * 166 * If seat's focus is @a wnd, it will be set to a different window 167 * that is not minimized, preferably not a system window. 168 * 169 * @param seat Seat 170 * @param wnd Window to remove focus from 171 */ 172 void ds_seat_unfocus_wnd(ds_seat_t *seat, ds_window_t *wnd) 173 { 174 ds_window_t *nwnd; 175 176 if (seat->focus != wnd) 177 return; 178 179 /* Find alternate window that is neither system nor minimized */ 180 nwnd = ds_window_find_alt(wnd, ~(wndf_minimized | wndf_system)); 181 182 if (nwnd == NULL) { 183 /* Find alternate window that is not minimized */ 184 nwnd = ds_window_find_alt(wnd, ~wndf_minimized); 185 } 186 187 ds_seat_set_focus(seat, nwnd); 162 188 } 163 189
Note:
See TracChangeset
for help on using the changeset viewer.