mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-04 20:20:13 +01:00
xwayland: Set output mode size as reported by the wl_output protocol
This means xwl_output->mode_width/height can be non-0 also with rootless, so need to check for rootful explicitly in xwl_output_find_mode.
This commit is contained in:
parent
b36f591323
commit
a136452f41
1 changed files with 6 additions and 2 deletions
|
|
@ -122,6 +122,9 @@ output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags,
|
|||
xwl_output->logical_w = width;
|
||||
xwl_output->logical_h = height;
|
||||
}
|
||||
|
||||
xwl_output->mode_width = width;
|
||||
xwl_output->mode_height = height;
|
||||
xwl_output->refresh = refresh;
|
||||
}
|
||||
|
||||
|
|
@ -424,8 +427,9 @@ xwl_output_find_mode(struct xwl_output *xwl_output,
|
|||
|
||||
/* width & height -1 means we want the actual output mode */
|
||||
if (width == -1 && height == -1) {
|
||||
if (xwl_output->mode_width > 0 && xwl_output->mode_height > 0) {
|
||||
/* If running rootful, use the current mode size to search for the mode */
|
||||
if (xwl_output == xwl_output->xwl_screen->fixed_output &&
|
||||
xwl_output->mode_width > 0 && xwl_output->mode_height > 0) {
|
||||
/* If running rootful, use the current fixed size to search for the mode */
|
||||
width = xwl_output->mode_width;
|
||||
height = xwl_output->mode_height;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue