If zero is passed as new size, we now simply use the current size. This
allows widgets to schedule a resize round without having to specify the
current size explicitely.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
int ret;
unsigned int oldw, oldh, neww, newh, minw, minh, flags;
- if (!wnd || !width || !height)
+ if (!width)
+ width = wnd->buffer.width;
+ if (!height)
+ height = wnd->buffer.height;
+
+ if (!width || !height)
return -EINVAL;
flags = 0;
int wlt_window_set_size(struct wlt_window *wnd,
unsigned int width, unsigned int height)
{
- if (!wnd || !width || !height)
+ if (!wnd)
return -EINVAL;
wnd->new_width = width;