mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Add a check for bundled Qt plugins
This commit is contained in:
@@ -271,6 +271,14 @@ bool IsGtkFileDialogForced() {
|
|||||||
#endif // !TDESKTOP_FORCE_GTK_FILE_DIALOG
|
#endif // !TDESKTOP_FORCE_GTK_FILE_DIALOG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsQtPluginsBundled() {
|
||||||
|
#ifdef DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
|
return true;
|
||||||
|
#else // DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
|
return false;
|
||||||
|
#endif // !DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
|
}
|
||||||
|
|
||||||
bool IsXDGDesktopPortalPresent() {
|
bool IsXDGDesktopPortalPresent() {
|
||||||
#ifdef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
#ifdef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||||
static const auto XDGDesktopPortalPresent = false;
|
static const auto XDGDesktopPortalPresent = false;
|
||||||
@@ -633,14 +641,16 @@ void start() {
|
|||||||
if(IsStaticBinary()
|
if(IsStaticBinary()
|
||||||
|| InAppImage()
|
|| InAppImage()
|
||||||
|| InSandbox()
|
|| InSandbox()
|
||||||
|| InSnap()) {
|
|| InSnap()
|
||||||
|
|| IsQtPluginsBundled()) {
|
||||||
qputenv("QT_WAYLAND_DECORATION", "material");
|
qputenv("QT_WAYLAND_DECORATION", "material");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IsStaticBinary()
|
if(IsStaticBinary()
|
||||||
|| InAppImage()
|
|| InAppImage()
|
||||||
|| InSnap()
|
|| InSnap()
|
||||||
|| IsGtkFileDialogForced()) {
|
|| IsGtkFileDialogForced()
|
||||||
|
|| IsQtPluginsBundled()) {
|
||||||
LOG(("Checking for XDG Desktop Portal..."));
|
LOG(("Checking for XDG Desktop Portal..."));
|
||||||
// this can give us a chance to use a proper file dialog for current session
|
// this can give us a chance to use a proper file dialog for current session
|
||||||
if (IsXDGDesktopPortalPresent()) {
|
if (IsXDGDesktopPortalPresent()) {
|
||||||
|
@@ -25,6 +25,7 @@ bool InSnap();
|
|||||||
bool InAppImage();
|
bool InAppImage();
|
||||||
bool IsStaticBinary();
|
bool IsStaticBinary();
|
||||||
bool IsGtkFileDialogForced();
|
bool IsGtkFileDialogForced();
|
||||||
|
bool IsQtPluginsBundled();
|
||||||
|
|
||||||
bool IsXDGDesktopPortalPresent();
|
bool IsXDGDesktopPortalPresent();
|
||||||
bool UseXDGDesktopPortal();
|
bool UseXDGDesktopPortal();
|
||||||
|
Reference in New Issue
Block a user