Changeset 1c6c3e1d in mainline for uspace/srv/hid/display/window.c


Ignore:
Timestamp:
2023-10-22T17:55:33Z (14 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
ticket/834-toolchain-update
Children:
350ec74
Parents:
315d487 (diff), 133461c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ticket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/window.c

    r315d487 r1c6c3e1d  
    9595        }
    9696
     97        wnd->flags = params->flags;
     98
    9799        ds_client_add_window(client, wnd);
    98100        ds_display_add_window(client->display, wnd);
     
    134136        wnd->gc = mem_gc_get_ctx(wnd->mgc);
    135137        wnd->cursor = wnd->display->cursor[dcurs_arrow];
    136         wnd->flags = params->flags;
    137138
    138139        if ((params->flags & wndf_setpos) != 0) {
     
    10921093 * @return Alternate window matching the criteria or @c NULL if there is none
    10931094 */
    1094 ds_window_t *ds_window_find_alt(ds_window_t *wnd,
     1095ds_window_t *ds_window_find_prev(ds_window_t *wnd,
     1096    display_wnd_flags_t allowed_flags)
     1097{
     1098        ds_window_t *nwnd;
     1099
     1100        /* Try preceding windows in display order */
     1101        nwnd = ds_display_next_window(wnd);
     1102        while (nwnd != NULL && (nwnd->flags & ~allowed_flags) != 0) {
     1103                nwnd = ds_display_next_window(nwnd);
     1104        }
     1105
     1106        /* Do we already have a matching window? */
     1107        if (nwnd != NULL && (nwnd->flags & ~allowed_flags) == 0) {
     1108                return nwnd;
     1109        }
     1110
     1111        /* Try succeeding windows in display order */
     1112        nwnd = ds_display_first_window(wnd->display);
     1113        while (nwnd != NULL && nwnd != wnd &&
     1114            (nwnd->flags & ~allowed_flags) != 0) {
     1115                nwnd = ds_display_next_window(nwnd);
     1116        }
     1117
     1118        if (nwnd == wnd)
     1119                return NULL;
     1120
     1121        return nwnd;
     1122}
     1123
     1124/** Find alternate window with the allowed flags.
     1125 *
     1126 * An alternate window is a *different* window that is preferably previous
     1127 * in the display order and only has the @a allowed flags.
     1128 *
     1129 * @param wnd Window
     1130 * @param allowed_flags Bitmask of flags that the window is allowed to have
     1131 *
     1132 * @return Alternate window matching the criteria or @c NULL if there is none
     1133 */
     1134ds_window_t *ds_window_find_next(ds_window_t *wnd,
    10951135    display_wnd_flags_t allowed_flags)
    10961136{
Note: See TracChangeset for help on using the changeset viewer.