Changeset 0d00e53 in mainline for uspace/lib


Ignore:
Timestamp:
2024-11-07T10:38:29Z (11 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
9a07ee3, 9e7e1dc
Parents:
ad9e225
git-author:
Jiri Svoboda <jiri@…> (2024-10-06 18:37:25)
git-committer:
Jiri Svoboda <jiri@…> (2024-11-07 10:38:29)
Message:

Shut down dialog

Location:
uspace/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/display/include/types/display/wndparams.h

    rad9e225 r0d00e53  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4242        /** Popup window (capture events, no focus) */
    4343        wndf_popup = 0x1,
     44        /** Window does not receive focus */
     45        wndf_nofocus = 0x2,
    4446        /** Topmost window */
    45         wndf_topmost = 0x2,
     47        wndf_topmost = 0x4,
    4648        /** Set specific initial window position */
    47         wndf_setpos = 0x4,
     49        wndf_setpos = 0x8,
    4850        /** Window is minimized */
    49         wndf_minimized = 0x8,
     51        wndf_minimized = 0x10,
    5052        /** Window is maximized */
    51         wndf_maximized = 0x10,
     53        wndf_maximized = 0x20,
    5254        /** Special system window */
    53         wndf_system = 0x20,
     55        wndf_system = 0x40,
    5456        /** Maximized windows should avoid this window */
    55         wndf_avoid = 0x40
     57        wndf_avoid = 0x80
    5658} display_wnd_flags_t;
    5759
  • uspace/lib/ui/include/types/ui/window.h

    rad9e225 r0d00e53  
    5858        /** Place window to the bottom-right corner of the screen */
    5959        ui_wnd_place_bottom_right,
     60        /** Place window to the center of the screen */
     61        ui_wnd_place_center,
    6062        /** Place window accross the entire screen */
    6163        ui_wnd_place_full_screen,
     
    6870        /** Popup window */
    6971        ui_wndf_popup = 0x1,
     72        /** Window does not receive focus */
     73        ui_wndf_nofocus = 0x2,
    7074        /** Topmost window */
    71         ui_wndf_topmost = 0x2,
     75        ui_wndf_topmost = 0x4,
    7276        /** Special system window */
    73         ui_wndf_system = 0x4,
     77        ui_wndf_system = 0x8,
    7478        /** Maximized windows should avoid this window */
    75         ui_wndf_avoid = 0x8
     79        ui_wndf_avoid = 0x10
    7680} ui_wnd_flags_t;
    7781
  • uspace/lib/ui/src/window.c

    rad9e225 r0d00e53  
    189189        switch (params->placement) {
    190190        case ui_wnd_place_default:
    191                 assert(ui_is_fullscreen(window->ui));
     191        case ui_wnd_place_center:
     192                assert(params->placement != ui_wnd_place_default ||
     193                    ui_is_fullscreen(window->ui));
    192194                /* Center window */
    193195                gfx_rect_dims(&params->rect, &dims);
     
    357359        if ((params->flags & ui_wndf_popup) != 0)
    358360                dparams.flags |= wndf_popup;
     361        if ((params->flags & ui_wndf_nofocus) != 0)
     362                dparams.flags |= wndf_nofocus;
    359363        if ((params->flags & ui_wndf_topmost) != 0)
    360364                dparams.flags |= wndf_topmost;
Note: See TracChangeset for help on using the changeset viewer.