Changeset 1bebc906 in mainline for uspace/srv/hid/display/window.c


Ignore:
Timestamp:
2021-06-10T12:51:21Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Parents:
4b72e81
git-author:
Jiri Svoboda <jiri@…> (2021-06-09 18:51:04)
git-committer:
Jiri Svoboda <jiri@…> (2021-06-10 12:51:21)
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

    r4b72e81 r1bebc906  
    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.