mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Use surface as XdgExporter parent
This commit is contained in:
parent
f7489592d6
commit
17c514e851
1 changed files with 5 additions and 6 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue