Changeset 9e84d2c in mainline for uspace/lib/ui


Ignore:
Timestamp:
2021-06-10T13:22:33Z (4 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.

Location:
uspace/lib/ui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/include/types/ui/window.h

    rc9927c66 r9e84d2c  
    6363} ui_wnd_placement_t;
    6464
     65/** Window flags */
     66typedef enum {
     67        /** Popup window */
     68        ui_wndf_popup = 0x1
     69} ui_wnd_flags_t;
     70
    6571/** Window parameters */
    6672typedef struct {
     
    7379        /** Window placement */
    7480        ui_wnd_placement_t placement;
     81        /** Window flags */
     82        ui_wnd_flags_t flags;
    7583        /** Parent rectangle for popup windows */
    7684        gfx_rect_t prect;
  • uspace/lib/ui/include/ui/window.h

    rc9927c66 r9e84d2c  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
  • uspace/lib/ui/src/popup.c

    rc9927c66 r9e84d2c  
    9494        wparams.style &= ~ui_wds_decorated;
    9595        wparams.placement = ui_wnd_place_popup;
     96        wparams.flags |= ui_wndf_popup;
    9697
    9798        /* Compute position of parent rectangle relative to the screen */
  • uspace/lib/ui/src/window.c

    rc9927c66 r9e84d2c  
    188188        gfx_rect_dims(&params->rect, &dparams.min_size);
    189189
     190        if ((params->flags & ui_wndf_popup) != 0)
     191                dparams.flags |= wndf_popup;
     192
    190193        if (ui->display != NULL) {
    191194                if (params->placement != ui_wnd_place_default) {
Note: See TracChangeset for help on using the changeset viewer.