Changeset 90f1f19 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:
db3895d
Parents:
98735eb
git-author:
Jiri Svoboda <jiri@…> (2021-06-09 18:51:04)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-06-10 13:22:33)
Message:

Allow setting initial window position (instead of moving the window)

To reduce display artifacts. We can create the menu popup windows
in the correct place from the start. The same goes for regular
windows with specific placement.

File:
1 edited

Legend:

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

    r98735eb r90f1f19  
    119119        wnd->flags = params->flags;
    120120
    121         wnd->dpos.x = ((wnd->id - 1) & 1) * 400;
    122         wnd->dpos.y = ((wnd->id - 1) & 2) / 2 * 300;
     121        if ((params->flags & wndf_setpos) != 0) {
     122                /* Specific window position */
     123                wnd->dpos = params->pos;
     124        } else {
     125                /* Automatic window placement */
     126                wnd->dpos.x = ((wnd->id - 1) & 1) * 400;
     127                wnd->dpos.y = ((wnd->id - 1) & 2) / 2 * 300;
     128        }
    123129
    124130        seat = ds_display_first_seat(client->display);
Note: See TracChangeset for help on using the changeset viewer.