forked from 12to11/12to11
Fix output computation when width and height are unspecified
* output.c (XLUpdateSurfaceOutputs): Calculate width and height before checking if the surface is in the output region.
This commit is contained in:
parent
a866c4068a
commit
584ea0ac4d
1 changed files with 5 additions and 5 deletions
10
output.c
10
output.c
|
@ -781,17 +781,17 @@ XLUpdateSurfaceOutputs (Surface *surface, int x, int y, int width,
|
|||
int n, i;
|
||||
struct wl_resource *resource;
|
||||
|
||||
if (BoxContains (pixman_region32_extents (&surface->output_region),
|
||||
x, y, width, height))
|
||||
/* The surface didn't move past the output region. */
|
||||
return;
|
||||
|
||||
if (width == -1)
|
||||
width = ViewWidth (surface->view);
|
||||
|
||||
if (height == -1)
|
||||
height = ViewHeight (surface->view);
|
||||
|
||||
if (BoxContains (pixman_region32_extents (&surface->output_region),
|
||||
x, y, width, height))
|
||||
/* The surface didn't move past the output region. */
|
||||
return;
|
||||
|
||||
/* TODO: store the number of outputs somewhere instead of hardcoding
|
||||
256. */
|
||||
n = ComputeSurfaceOutputs (x, y, width, height,
|
||||
|
|
Loading…
Add table
Reference in a new issue