If window is not present, create window

This commit is contained in:
benutzer193 2019-01-26 17:49:20 +01:00 committed by GitHub
parent 1ee66d5204
commit 8e26b13578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -657,8 +657,11 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
wl->width = width;
wl->height = height;
}
wl_egl_window_resize(wl->win, width, height, 0, 0);
if (wl->win)
wl_egl_window_resize(wl->win, width, height, 0, 0);
else
wl->win = wl_egl_window_create(wl->surface, wl->width * wl->buffer_scale, wl->height * wl->buffer_scale);
wl->configured = false;
}
@ -724,7 +727,10 @@ static void handle_zxdg_toplevel_config(void *data, struct zxdg_toplevel_v6 *top
wl->height = height;
}
wl_egl_window_resize(wl->win, width, height, 0, 0);
if (wl->win)
wl_egl_window_resize(wl->win, width, height, 0, 0);
else
wl->win = wl_egl_window_create(wl->surface, wl->width * wl->buffer_scale, wl->height * wl->buffer_scale);
wl->configured = false;
}