Changeset ededdc4 in mainline for uspace/srv/hid/display/seat.c


Ignore:
Timestamp:
2023-01-05T20:17:32Z (16 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ca9aa89
Parents:
17c0f5d
Message:

Use ds_window_unfocus() when destroying a window

File:
1 edited

Legend:

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

    r17c0f5d rededdc4  
    138138/** Evacuate seat references to window.
    139139 *
    140  * If seat's focus is @a wnd, it will be set to a different window.
     140 * If seat's focus is @a wnd, it will be set to NULL.
    141141 * If seat's popup window is @a wnd, it will be set to NULL.
    142142 *
     
    146146void ds_seat_evac_wnd_refs(ds_seat_t *seat, ds_window_t *wnd)
    147147{
    148         ds_window_t *nwnd;
    149 
    150         if (seat->focus == wnd) {
    151                 nwnd = ds_display_prev_window(wnd);
    152                 if (nwnd == NULL)
    153                         nwnd = ds_display_last_window(wnd->display);
    154                 if (nwnd == wnd)
    155                         nwnd = NULL;
    156 
    157                 ds_seat_set_focus(seat, nwnd);
    158         }
     148        if (seat->focus == wnd)
     149                ds_seat_set_focus(seat, NULL);
    159150
    160151        if (seat->popup == wnd)
Note: See TracChangeset for help on using the changeset viewer.