mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +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 <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,
|
||||
|
|
Loading…
Add table
Reference in a new issue