xdg-shell-v6: next_geometry and geometry fields are not longer pointers in wlr_xdg_surface_v6

This commit is contained in:
emersion 2018-03-13 22:17:25 +01:00
parent 149209b72e
commit ace738dbca
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 32 additions and 56 deletions

View file

@ -60,9 +60,9 @@ static void get_size(const struct roots_view *view, struct wlr_box *box) {
assert(view->type == ROOTS_XDG_SHELL_V6_VIEW);
struct wlr_xdg_surface_v6 *surface = view->xdg_surface_v6;
if (surface->geometry->width > 0 && surface->geometry->height > 0) {
box->width = surface->geometry->width;
box->height = surface->geometry->height;
if (surface->geometry.width > 0 && surface->geometry.height > 0) {
box->width = surface->geometry.width;
box->height = surface->geometry.height;
} else if (view->wlr_surface != NULL) {
box->width = view->wlr_surface->current->width;
box->height = view->wlr_surface->current->height;