Changeset 5d62130 in mainline for uspace/srv/hid/display/display.c
- Timestamp:
- 2022-11-13T10:56:43Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a130983
- Parents:
- a5c7b865
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
ra5c7b865 r5d62130 313 313 } 314 314 315 /** Add window to window list. 316 * 317 * Topmost windows are enlisted before any other window. Non-topmost 318 * windows are enlisted before any other non-topmost window. 319 * 320 * @param display Display 321 * @param wnd Window 322 */ 323 void ds_display_enlist_window(ds_display_t *display, ds_window_t *wnd) 324 { 325 ds_window_t *w; 326 327 assert(wnd->display == display); 328 assert(!link_used(&wnd->ldwindows)); 329 330 if ((wnd->flags & wndf_topmost) == 0) { 331 /* Find the first non-topmost window */ 332 w = ds_display_first_window(display); 333 while (w != NULL && (w->flags & wndf_topmost) != 0) 334 w = ds_display_next_window(w); 335 336 if (w != NULL) 337 list_insert_before(&wnd->ldwindows, &w->ldwindows); 338 else 339 list_append(&wnd->ldwindows, &display->windows); 340 } else { 341 /* Insert at the beginning */ 342 list_prepend(&wnd->ldwindows, &display->windows); 343 } 344 345 } 346 315 347 /** Add window to display. 316 348 * … … 326 358 327 359 wnd->display = display; 328 list_prepend(&wnd->ldwindows, &display->windows);360 ds_display_enlist_window(display, wnd); 329 361 330 362 /* Notify window managers about the new window */ … … 369 401 370 402 list_remove(&wnd->ldwindows); 371 list_prepend(&wnd->ldwindows, &wnd->display->windows);403 ds_display_enlist_window(wnd->display, wnd); 372 404 } 373 405
Note:
See TracChangeset
for help on using the changeset viewer.