2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use surface as XdgExporter parent

This commit is contained in:
Ilya Fedin
2021-05-13 08:39:16 +04:00
committed by John Preston
parent f7489592d6
commit 17c514e851

View File

@@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/base_platform_info.h"
#include <QtCore/QCoreApplication>
#include <connection_thread.h>
#include <registry.h>
#include <surface.h>
@@ -92,10 +91,10 @@ WaylandIntegration::Private::Private()
};
connect(
QCoreApplication::instance(),
&QCoreApplication::aboutToQuit,
this,
[=] { _xdgExporter = nullptr; });
_applicationConnection,
&ConnectionThread::connectionDied,
_xdgExporter.get(),
&XdgExporter::destroy);
});
_connection.initConnection();
@@ -130,7 +129,7 @@ QString WaylandIntegration::nativeHandle(QWindow *window) {
if (const auto surface = Surface::fromWindow(window)) {
if (const auto exported = exporter->exportTopLevel(
surface,
_private->xdgExporter())) {
surface)) {
QEventLoop loop;
QObject::connect(
exported,