Post invalid_positioner error to the right resource

The invalid_positioner error is defined for the xdg_wm_base interface,
not xdg_surface.
This commit is contained in:
Vlad Zahorodnii 2020-11-04 00:02:15 +02:00
parent 9f83741621
commit d0c93b5bc5

View file

@ -216,7 +216,9 @@ void XdgSurfaceInterfacePrivate::xdg_surface_get_popup(Resource *resource, uint3
XdgPositioner positioner = XdgPositioner::get(positionerResource);
if (!positioner.isComplete()) {
wl_resource_post_error(resource->handle, QtWaylandServer::xdg_wm_base::error_invalid_positioner,
auto shellPrivate = XdgShellInterfacePrivate::get(shell);
wl_resource_post_error(shellPrivate->resourceForXdgSurface(q)->handle,
QtWaylandServer::xdg_wm_base::error_invalid_positioner,
"xdg_positioner is incomplete");
return;
}