mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Run in background on Linux when minimization is not supported
This commit is contained in:
parent
e8a1fc0300
commit
e946bf5338
2 changed files with 8 additions and 4 deletions
|
@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "base/platform/linux/base_linux_dbus_utilities.h"
|
#include "base/platform/linux/base_linux_dbus_utilities.h"
|
||||||
#include "base/platform/linux/base_linux_xdp_utilities.h"
|
#include "base/platform/linux/base_linux_xdp_utilities.h"
|
||||||
|
#include "ui/platform/ui_platform_window_title.h"
|
||||||
#include "platform/linux/linux_desktop_environment.h"
|
#include "platform/linux/linux_desktop_environment.h"
|
||||||
#include "platform/linux/linux_wayland_integration.h"
|
#include "platform/linux/linux_wayland_integration.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
@ -534,6 +535,13 @@ bool SkipTaskbarSupported() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RunInBackground() {
|
||||||
|
const auto layout = Ui::Platform::TitleControlsLayout();
|
||||||
|
using TitleControl = Ui::Platform::TitleControl;
|
||||||
|
return !ranges::contains(layout.left, TitleControl::Minimize)
|
||||||
|
&& !ranges::contains(layout.right, TitleControl::Minimize);
|
||||||
|
}
|
||||||
|
|
||||||
QString ExecutablePathForShortcuts() {
|
QString ExecutablePathForShortcuts() {
|
||||||
if (Core::UpdaterDisabled()) {
|
if (Core::UpdaterDisabled()) {
|
||||||
const auto &arguments = Core::Launcher::Instance().arguments();
|
const auto &arguments = Core::Launcher::Instance().arguments();
|
||||||
|
|
|
@ -24,10 +24,6 @@ inline void WriteCrashDumpDetails() {
|
||||||
inline void AutostartRequestStateFromSystem(Fn<void(bool)> callback) {
|
inline void AutostartRequestStateFromSystem(Fn<void(bool)> callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool RunInBackground() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool PreventsQuit(Core::QuitReason reason) {
|
inline bool PreventsQuit(Core::QuitReason reason) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue