Ignore:
File:
1 edited

Legend:

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

    r1543d4c r3e7e226  
    8888        seat->client_cursor = display->cursor[dcurs_arrow];
    8989        seat->wm_cursor = NULL;
    90         seat->focus = ds_display_first_window(display);
    9190
    9291        *rseat = seat;
     
    205204
    206205        /* Find alternate window that is neither system nor minimized */
    207         nwnd = ds_window_find_prev(wnd, ~(wndf_minimized | wndf_system));
     206        nwnd = ds_window_find_alt(wnd, ~(wndf_minimized | wndf_system));
    208207
    209208        if (nwnd == NULL) {
    210209                /* Find alternate window that is not minimized */
    211                 nwnd = ds_window_find_prev(wnd, ~wndf_minimized);
     210                nwnd = ds_window_find_alt(wnd, ~wndf_minimized);
    212211        }
    213212
     
    224223        ds_window_t *nwnd;
    225224
    226         if (seat->focus != NULL) {
    227                 /* Find alternate window that is not a system window */
    228                 nwnd = ds_window_find_next(seat->focus, ~wndf_system);
    229         } else {
    230                 /* Currently no focus. Focus topmost window. */
    231                 nwnd = ds_display_first_window(seat->display);
    232         }
     225        /* Find alternate window that is not a system window */
     226        nwnd = ds_window_find_alt(seat->focus, ~wndf_system);
    233227
    234228        /* Only switch focus if there is another window */
     
    515509        wnd = ds_display_window_by_pos(seat->display, &seat->pntpos);
    516510
     511        /* Click outside popup window */
     512        if (event->type == POS_PRESS && wnd != seat->popup) {
     513                /* Close popup window */
     514                ds_seat_set_popup(seat, NULL);
     515        }
     516
    517517        /* Deliver event to popup window. */
    518         if (seat->popup != NULL && event->type != POS_PRESS) {
     518        if (seat->popup != NULL) {
    519519                rc = ds_window_post_pos_event(seat->popup, event);
    520520                if (rc != EOK)
     
    540540                 * to the same window above.
    541541                 */
    542                 if (wnd != seat->popup || event->type == POS_PRESS) {
     542                if (wnd != seat->popup) {
    543543                        rc = ds_window_post_pos_event(wnd, event);
    544544                        if (rc != EOK)
     
    550550        }
    551551
    552         /* Click outside popup window */
    553         if (event->type == POS_PRESS && wnd != seat->popup) {
    554                 /* Close popup window */
    555                 ds_seat_set_popup(seat, NULL);
    556         }
    557 
    558552        return EOK;
    559553}
Note: See TracChangeset for help on using the changeset viewer.