mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Re-use the Wayland AutoDestroyer's lifetime in WaylandIntegration::Private
This commit is contained in:
parent
7dbf331e18
commit
ad87c2a15e
1 changed files with 1 additions and 2 deletions
|
@ -42,7 +42,6 @@ struct WaylandIntegration::Private : public AutoDestroyer<QtWayland::wl_registry
|
||||||
QtWayland::org_kde_plasma_surface plasmaSurface(QWindow *window);
|
QtWayland::org_kde_plasma_surface plasmaSurface(QWindow *window);
|
||||||
|
|
||||||
std::optional<PlasmaShell> plasmaShell;
|
std::optional<PlasmaShell> plasmaShell;
|
||||||
rpl::lifetime lifetime;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void registry_global(
|
void registry_global(
|
||||||
|
@ -129,7 +128,7 @@ WaylandIntegration *WaylandIntegration::Instance() {
|
||||||
&QObject::destroyed
|
&QObject::destroyed
|
||||||
) | rpl::start_with_next([] {
|
) | rpl::start_with_next([] {
|
||||||
instance = std::nullopt;
|
instance = std::nullopt;
|
||||||
}, instance->_private->lifetime);
|
}, instance->_private->lifetime());
|
||||||
return true;
|
return true;
|
||||||
}();
|
}();
|
||||||
if (!instance) return nullptr;
|
if (!instance) return nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue