diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-03-08 01:30:51 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-03-08 09:45:22 +0100 |
commit | aa5c3699109f866b1002621f48a11c54562eb572 (patch) | |
tree | 7e77314ba79025223ab1081b0ce2d0ad476c3e14 /examples/foreign-toplevel.c | |
parent | 2baad6eba6c7f4edd3bc1ca266503920e9789ad0 (diff) |
wlr_output_layout_get_box: handle empty layout
If there were no outputs in the output layout,
wlr_output_layout_get_box would return the box:
{
.x = INT_MIN,
.y = INT_MIN,
.width = INT_MIN - INT_MAX,
.height = INT_MIN - INT_MAX
}
which results in an integer underflow for both the width and height.
This changes the logic to have the box be all zeroes, since an empty
output layout does not have a width or height and the location of
something without a size is irrelevant so this just uses the origin.
Diffstat (limited to 'examples/foreign-toplevel.c')
0 files changed, 0 insertions, 0 deletions