Changes in uspace/srv/hid/display/client.c [195b7b3:46a47c0] in mainline
- File:
-
- 1 edited
-
uspace/srv/hid/display/client.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/client.c
r195b7b3 r46a47c0 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2023 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_ focus(seat, wnd);117 ds_seat_evac_wnd_refs(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); 120 123 121 124 list_remove(&wnd->lcwindows); … … 178 181 * @param ewindow Place to store pointer to window receiving the event 179 182 * @param event Place to store event 180 * @return Graphic context183 * @return EOK on success, ENOENT if event queue is empty 181 184 */ 182 185 errno_t ds_client_get_event(ds_client_t *client, ds_window_t **ewindow, … … 199 202 } 200 203 204 /** Purge events from client event queue referring to a window. 205 * 206 * @param client Client 207 * @param window Window 208 */ 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 201 228 /** Post close event to the client's message queue. 202 229 * … … 230 257 * @param client Client 231 258 * @param ewindow Window that the message is targetted to 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) 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) 236 265 { 237 266 ds_window_ev_t *wevent; … … 243 272 wevent->window = ewindow; 244 273 wevent->event.etype = wev_focus; 274 wevent->event.ev.focus = *event; 245 275 list_append(&wevent->levents, &client->events); 246 276 … … 346 376 * @param client Client 347 377 * @param ewindow Window that the message is targetted to 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) 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) 352 384 { 353 385 ds_window_ev_t *wevent; … … 359 391 wevent->window = ewindow; 360 392 wevent->event.etype = wev_unfocus; 393 wevent->event.ev.unfocus = *event; 361 394 list_append(&wevent->levents, &client->events); 362 395
Note:
See TracChangeset
for help on using the changeset viewer.
