Ignore:
File:
1 edited

Legend:

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

    rbe0ec50 r5d380b6  
    9595        }
    9696
    97         wnd->flags = params->flags;
    98 
    9997        ds_client_add_window(client, wnd);
    10098        ds_display_add_window(client->display, wnd);
     
    136134        wnd->gc = mem_gc_get_ctx(wnd->mgc);
    137135        wnd->cursor = wnd->display->cursor[dcurs_arrow];
     136        wnd->flags = params->flags;
    138137
    139138        if ((params->flags & wndf_setpos) != 0) {
     
    10931092 * @return Alternate window matching the criteria or @c NULL if there is none
    10941093 */
    1095 ds_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  */
    1134 ds_window_t *ds_window_find_next(ds_window_t *wnd,
     1094ds_window_t *ds_window_find_alt(ds_window_t *wnd,
    11351095    display_wnd_flags_t allowed_flags)
    11361096{
Note: See TracChangeset for help on using the changeset viewer.