Changeset 9e84d2c in mainline for uspace/srv/hid/display/window.c


Ignore:
Timestamp:
2021-06-10T13:22:33Z (3 years ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5823aef3
Parents:
c9927c66
git-author:
Jiri Svoboda <jiri@…> (2021-06-02 17:00:03)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-06-10 13:22:33)
Message:

Popup windows event delivery is special

Popup windows don't get focus, yet they still receive events.

File:
1 edited

Legend:

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

    rc9927c66 r9e84d2c  
    6767{
    6868        ds_window_t *wnd = NULL;
     69        ds_seat_t *seat;
    6970        gfx_context_t *dgc;
    7071        gfx_coord2_t dims;
     
    116117        wnd->gc = mem_gc_get_ctx(wnd->mgc);
    117118        wnd->cursor = wnd->display->cursor[dcurs_arrow];
     119        wnd->flags = params->flags;
     120
     121        wnd->dpos.x = ((wnd->id - 1) & 1) * 400;
     122        wnd->dpos.y = ((wnd->id - 1) & 2) / 2 * 300;
     123
     124        seat = ds_display_first_seat(client->display);
     125
     126        if ((params->flags & wndf_popup) != 0)
     127                ds_seat_set_popup(seat, wnd);
     128        else
     129                ds_seat_set_focus(seat, wnd);
     130
     131        (void) ds_display_paint(wnd->display, NULL);
     132
    118133        *rgc = wnd;
    119134        return EOK;
Note: See TracChangeset for help on using the changeset viewer.