mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
35 lines
1.8 KiB
Diff
35 lines
1.8 KiB
Diff
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
|
|
index 207158bf..0eb919e0 100644
|
|
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
|
|
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
|
|
@@ -975,7 +975,7 @@ bool QWaylandSurface::setRole(QWaylandSurfaceRole *role, wl_resource *errorResou
|
|
{
|
|
Q_D(QWaylandSurface);
|
|
|
|
- if (d->role && d->role != role) {
|
|
+ if (d->role && role && d->role != role) {
|
|
wl_resource_post_error(errorResource, errorCode,
|
|
"Cannot assign role %s to wl_surface@%d, already has role %s\n",
|
|
role->name().constData(), wl_resource_get_id(resource()),
|
|
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp
|
|
index 871f0cf6..d47de4f9 100644
|
|
--- a/src/compositor/extensions/qwaylandxdgshell.cpp
|
|
+++ b/src/compositor/extensions/qwaylandxdgshell.cpp
|
|
@@ -1346,6 +1346,7 @@ void QWaylandXdgToplevelPrivate::xdg_toplevel_destroy(QtWaylandServer::xdg_tople
|
|
if (Q_UNLIKELY(m_decoration))
|
|
qWarning() << "Client error: xdg_toplevel destroyed before its decoration object";
|
|
|
|
+ m_xdgSurface->surface()->setRole(nullptr, resource->handle, XDG_WM_BASE_ERROR_ROLE);
|
|
wl_resource_destroy(resource->handle);
|
|
//TODO: Should the xdg surface be desroyed as well? Or is it allowed to recreate a new toplevel for it?
|
|
}
|
|
@@ -1921,7 +1922,7 @@ uint QWaylandXdgPopupPrivate::sendConfigure(const QRect &geometry)
|
|
|
|
void QWaylandXdgPopupPrivate::xdg_popup_destroy(QtWaylandServer::xdg_popup::Resource *resource)
|
|
{
|
|
- Q_UNUSED(resource);
|
|
+ m_xdgSurface->surface()->setRole(nullptr, resource->handle, XDG_WM_BASE_ERROR_ROLE);
|
|
qWarning() << Q_FUNC_INFO << "Not implemented"; //TODO
|
|
}
|
|
|