mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Fix TDESKTOP_USE_PORTAL on gtk environments
This commit is contained in:
@@ -113,14 +113,15 @@ bool UseNative(Type type = Type::ReadFile) {
|
|||||||
// or if QT_QPA_PLATFORMTHEME=(gtk2|gtk3)
|
// or if QT_QPA_PLATFORMTHEME=(gtk2|gtk3)
|
||||||
// or if portals are used and operation is to open folder
|
// or if portals are used and operation is to open folder
|
||||||
// and portal doesn't support folder choosing
|
// and portal doesn't support folder choosing
|
||||||
const auto neededForPortal = UseXDGDesktopPortal()
|
const auto neededForPortal = (type == Type::ReadFolder)
|
||||||
&& type == Type::ReadFolder
|
|
||||||
&& !CanOpenDirectoryWithPortal();
|
&& !CanOpenDirectoryWithPortal();
|
||||||
|
|
||||||
const auto neededNonForced = DesktopEnvironment::IsGtkBased()
|
const auto neededNonForced = DesktopEnvironment::IsGtkBased()
|
||||||
|| neededForPortal;
|
|| (UseXDGDesktopPortal() && neededForPortal);
|
||||||
|
|
||||||
const auto excludeNonForced = InFlatpak() || InSnap();
|
const auto excludeNonForced = InFlatpak()
|
||||||
|
|| InSnap()
|
||||||
|
|| (UseXDGDesktopPortal() && !neededForPortal);
|
||||||
|
|
||||||
return IsGtkIntegrationForced()
|
return IsGtkIntegrationForced()
|
||||||
|| (neededNonForced && !excludeNonForced);
|
|| (neededNonForced && !excludeNonForced);
|
||||||
|
Reference in New Issue
Block a user