mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Use surface as XdgExporter parent
This commit is contained in:
@@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
|
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
|
|
||||||
#include <QtCore/QCoreApplication>
|
|
||||||
#include <connection_thread.h>
|
#include <connection_thread.h>
|
||||||
#include <registry.h>
|
#include <registry.h>
|
||||||
#include <surface.h>
|
#include <surface.h>
|
||||||
@@ -92,10 +91,10 @@ WaylandIntegration::Private::Private()
|
|||||||
};
|
};
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
QCoreApplication::instance(),
|
_applicationConnection,
|
||||||
&QCoreApplication::aboutToQuit,
|
&ConnectionThread::connectionDied,
|
||||||
this,
|
_xdgExporter.get(),
|
||||||
[=] { _xdgExporter = nullptr; });
|
&XdgExporter::destroy);
|
||||||
});
|
});
|
||||||
|
|
||||||
_connection.initConnection();
|
_connection.initConnection();
|
||||||
@@ -130,7 +129,7 @@ QString WaylandIntegration::nativeHandle(QWindow *window) {
|
|||||||
if (const auto surface = Surface::fromWindow(window)) {
|
if (const auto surface = Surface::fromWindow(window)) {
|
||||||
if (const auto exported = exporter->exportTopLevel(
|
if (const auto exported = exporter->exportTopLevel(
|
||||||
surface,
|
surface,
|
||||||
_private->xdgExporter())) {
|
surface)) {
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
exported,
|
exported,
|
||||||
|
Reference in New Issue
Block a user