Changeset View
Changeset View
Standalone View
Standalone View
files/0001-fix-freeze-after-file-dialog.patch
- This file was added.
| From 1261c775d4ca6fb78277ec213794da7c15e304e2 Mon Sep 17 00:00:00 2001 | |||||
| From: Ilya Fedin <fedin-ilja2010@ya.ru> | |||||
| Date: Fri, 2 Jul 2021 16:50:34 +0400 | |||||
| Subject: [PATCH] Fix freeze after creating file dialog | |||||
| --- | |||||
| .../platform/linux/linux_xdp_file_dialog.cpp | 14 +++++++------- | |||||
| 1 file changed, 7 insertions(+), 7 deletions(-) | |||||
| diff --git a/Telegram/SourceFiles/platform/linux/linux_xdp_file_dialog.cpp b/Telegram/SourceFiles/platform/linux/linux_xdp_file_dialog.cpp | |||||
| index 7bbd7e218644..96d5b2102e03 100644 | |||||
| --- a/Telegram/SourceFiles/platform/linux/linux_xdp_file_dialog.cpp | |||||
| +++ b/Telegram/SourceFiles/platform/linux/linux_xdp_file_dialog.cpp | |||||
| @@ -569,13 +569,6 @@ int XDPFileDialog::exec() { | |||||
| setAttribute(Qt::WA_ShowModal, true); | |||||
| setResult(0); | |||||
| - show(); | |||||
| - if (failedToOpen()) { | |||||
| - return result(); | |||||
| - } | |||||
| - | |||||
| - QPointer<QDialog> guard = this; | |||||
| - | |||||
| // HACK we have to avoid returning until we emit | |||||
| // that the dialog was accepted or rejected | |||||
| const auto context = Glib::MainContext::create(); | |||||
| @@ -593,6 +586,13 @@ int XDPFileDialog::exec() { | |||||
| loop->quit(); | |||||
| }, lifetime); | |||||
| + show(); | |||||
| + if (failedToOpen()) { | |||||
| + return result(); | |||||
| + } | |||||
| + | |||||
| + QPointer<QDialog> guard = this; | |||||
| + | |||||
| loop->run(); | |||||
| g_main_context_pop_thread_default(context->gobj()); | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.