wayland/layershell: refactor layer shell surface integration

In addition to the much needed cleanup:

- The bridge/extension type is now directly tied to the QWindow
instead of the WlrLayershell object, and is much smaller.
- Layer requests are now comitted via polish instead of for each
change individually.
This commit is contained in:
outfoxxed 2025-05-13 14:43:48 -07:00
parent 6a8284dae3
commit e0cff677a5
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
13 changed files with 366 additions and 495 deletions

View file

@ -6,16 +6,20 @@
#include "surface.hpp"
QSWaylandLayerShellIntegration::QSWaylandLayerShellIntegration()
: QtWaylandClient::QWaylandShellIntegrationTemplate<QSWaylandLayerShellIntegration>(4) {}
namespace qs::wayland::layershell {
QSWaylandLayerShellIntegration::~QSWaylandLayerShellIntegration() {
LayerShellIntegration::LayerShellIntegration()
: QtWaylandClient::QWaylandShellIntegrationTemplate<LayerShellIntegration>(4) {}
LayerShellIntegration::~LayerShellIntegration() {
if (this->isInitialized()) {
this->destroy();
}
}
QtWaylandClient::QWaylandShellSurface*
QSWaylandLayerShellIntegration::createShellSurface(QtWaylandClient::QWaylandWindow* window) {
return new QSWaylandLayerSurface(this, window);
LayerShellIntegration::createShellSurface(QtWaylandClient::QWaylandWindow* window) {
return new LayerSurface(this, window);
}
} // namespace qs::wayland::layershell