mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 02:54:31 -04:00
Store QWaylandLayerShell using a QScopedPointer
This is to ensure that the QWaylandLayerShell will be eventually destroyed.
This commit is contained in:
committed by
Aleix Pol Gonzalez
parent
93f3ed2c07
commit
8d1aeb7bf1
@ -18,6 +18,10 @@ QWaylandLayerShellIntegration::QWaylandLayerShellIntegration()
|
||||
{
|
||||
}
|
||||
|
||||
QWaylandLayerShellIntegration::~QWaylandLayerShellIntegration()
|
||||
{
|
||||
}
|
||||
|
||||
bool QWaylandLayerShellIntegration::initialize(QtWaylandClient::QWaylandDisplay *display)
|
||||
{
|
||||
QWaylandShellIntegration::initialize(display);
|
||||
@ -35,7 +39,7 @@ void QWaylandLayerShellIntegration::registryLayer(void *data, struct wl_registry
|
||||
QWaylandLayerShellIntegration *shell = static_cast<QWaylandLayerShellIntegration *>(data);
|
||||
|
||||
if (interface == zwlr_layer_shell_v1_interface.name)
|
||||
shell->m_layerShell = new QWaylandLayerShell(registry, id, std::min(version, 4u));
|
||||
shell->m_layerShell.reset(new QWaylandLayerShell(registry, id, std::min(version, 4u)));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user