Changes in uspace/srv/hid/display/client.c [46a47c0:195b7b3] in mainline
- File:
-
- 1 edited
-
uspace/srv/hid/display/client.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/client.c
r46a47c0 r195b7b3 1 1 /* 2 * Copyright (c) 20 23Jiri Svoboda2 * Copyright (c) 2019 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 115 115 seat = ds_display_first_seat(wnd->display); 116 116 while (seat != NULL) { 117 ds_seat_evac_ wnd_refs(seat, wnd);117 ds_seat_evac_focus(seat, wnd); 118 118 seat = ds_display_next_seat(seat); 119 119 } 120 121 /* Make sure no event in the queue is referencing the window */122 ds_client_purge_window_events(wnd->client, wnd);123 120 124 121 list_remove(&wnd->lcwindows); … … 181 178 * @param ewindow Place to store pointer to window receiving the event 182 179 * @param event Place to store event 183 * @return EOK on success, ENOENT if event queue is empty180 * @return Graphic context 184 181 */ 185 182 errno_t ds_client_get_event(ds_client_t *client, ds_window_t **ewindow, … … 202 199 } 203 200 204 /** Purge events from client event queue referring to a window.205 *206 * @param client Client207 * @param window Window208 */209 void ds_client_purge_window_events(ds_client_t *client,210 ds_window_t *window)211 {212 link_t *cur;213 link_t *next;214 ds_window_ev_t *wevent;215 216 cur = list_first(&client->events);217 while (cur != NULL) {218 next = list_next(cur, &client->events);219 wevent = list_get_instance(cur, ds_window_ev_t, levents);220 221 if (wevent->window == window)222 list_remove(cur);223 224 cur = next;225 }226 }227 228 201 /** Post close event to the client's message queue. 229 202 * … … 257 230 * @param client Client 258 231 * @param ewindow Window that the message is targetted to 259 * @param event Focus event data 260 * 261 * @return EOK on success or an error code 262 */ 263 errno_t ds_client_post_focus_event(ds_client_t *client, ds_window_t *ewindow, 264 display_wnd_focus_ev_t *event) 232 * 233 * @return EOK on success or an error code 234 */ 235 errno_t ds_client_post_focus_event(ds_client_t *client, ds_window_t *ewindow) 265 236 { 266 237 ds_window_ev_t *wevent; … … 272 243 wevent->window = ewindow; 273 244 wevent->event.etype = wev_focus; 274 wevent->event.ev.focus = *event;275 245 list_append(&wevent->levents, &client->events); 276 246 … … 376 346 * @param client Client 377 347 * @param ewindow Window that the message is targetted to 378 * @param event Unfocus event data 379 * 380 * @return EOK on success or an error code 381 */ 382 errno_t ds_client_post_unfocus_event(ds_client_t *client, ds_window_t *ewindow, 383 display_wnd_unfocus_ev_t *event) 348 * 349 * @return EOK on success or an error code 350 */ 351 errno_t ds_client_post_unfocus_event(ds_client_t *client, ds_window_t *ewindow) 384 352 { 385 353 ds_window_ev_t *wevent; … … 391 359 wevent->window = ewindow; 392 360 wevent->event.etype = wev_unfocus; 393 wevent->event.ev.unfocus = *event;394 361 list_append(&wevent->levents, &client->events); 395 362
Note:
See TracChangeset
for help on using the changeset viewer.
