mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Fix TDESKTOP_USE_PORTAL on gtk environments
This commit is contained in:
parent
204a08df14
commit
44c24f9fff
1 changed files with 5 additions and 4 deletions
|
@ -113,14 +113,15 @@ bool UseNative(Type type = Type::ReadFile) {
|
|||
// or if QT_QPA_PLATFORMTHEME=(gtk2|gtk3)
|
||||
// or if portals are used and operation is to open folder
|
||||
// and portal doesn't support folder choosing
|
||||
const auto neededForPortal = UseXDGDesktopPortal()
|
||||
&& type == Type::ReadFolder
|
||||
const auto neededForPortal = (type == Type::ReadFolder)
|
||||
&& !CanOpenDirectoryWithPortal();
|
||||
|
||||
const auto neededNonForced = DesktopEnvironment::IsGtkBased()
|
||||
|| neededForPortal;
|
||||
|| (UseXDGDesktopPortal() && neededForPortal);
|
||||
|
||||
const auto excludeNonForced = InFlatpak() || InSnap();
|
||||
const auto excludeNonForced = InFlatpak()
|
||||
|| InSnap()
|
||||
|| (UseXDGDesktopPortal() && !neededForPortal);
|
||||
|
||||
return IsGtkIntegrationForced()
|
||||
|| (neededNonForced && !excludeNonForced);
|
||||
|
|
Loading…
Add table
Reference in a new issue