Commit graph

1315 commits

Author SHA1 Message Date
Ilya Fedin
47195e316f Don't load SetCurrentProcessExplicitAppUserModelID dynamically
It's supported since Windows 7
2023-09-21 13:39:26 +04:00
Ilya Fedin
df29af5aea CentOS 7 -> Rocky Linux 8 2023-09-20 22:32:35 +04:00
Ilya Fedin
7b4a542890 Always wait for updater to exit on Linux 2023-09-20 18:05:45 +04:00
Ilya Fedin
b35fff01b0 Restore initial working directory on restart
So executable path computation still works for the new instance on systems deducing it by argv0
2023-09-20 18:05:45 +04:00
Ilya Fedin
949c486cac Use a higher-level API for restarts/updates on Linux
This gets rid of the custom arguments container
2023-09-20 18:05:45 +04:00
Ilya Fedin
082b5ba782 Get rid of sandboxed paths workaround
This is fixed in xdg-desktop-portal 1.17.

There's no way to check xdg-desktop-portal version so it's either not having support for passing last used path at all in sandbox or encountering the bug on old systems.
2023-09-20 17:58:41 +04:00
Ilya Fedin
0f86968afd Use ServerInformation without std::optional 2023-09-20 17:52:39 +04:00
Ilya Fedin
90f52d80d7 Avoid global copying in Linux native notifications 2023-09-20 17:52:39 +04:00
Ilya Fedin
4e97599e9d Use Glib::ustring in Linux notification globals 2023-09-20 17:52:39 +04:00
Ilya Fedin
e0b4d1edce Avoid unneeded std::string casts in exception handling 2023-09-20 17:45:37 +04:00
Ilya Fedin
ea41aab713 Make use of templated XDP::ReadSetting 2023-09-18 19:52:48 +04:00
Ilya Fedin
cb838e6e52 Make use of the new XDP::SettingWatcher constructor 2023-09-18 12:44:20 +04:00
Ilya Fedin
8ea4f26e31 Simplify some using-s 2023-09-17 19:54:54 +04:00
Ilya Fedin
ad87c2a15e Re-use the Wayland AutoDestroyer's lifetime in WaylandIntegration::Private 2023-09-16 06:26:51 +04:00
Ilya Fedin
7dbf331e18 Fix org_kde_plasma_surface destroyer lambda leak 2023-09-16 06:26:51 +04:00
Ilya Fedin
7906be37b6 Change #if-ery to be more in line with cmake logic (LINUX = NOT WIN32 AND NOT APPLE) 2023-09-15 19:52:22 +04:00
Ilya Fedin
0b4a255acc Use SNAP_INSTANCE_NAME in SingleInstanceLocalServerName
That's what snapd's apparmor profiles use
2023-09-14 09:27:13 +04:00
Ilya Fedin
dfa5386a27 Ensure closing is supported for running in background 2023-09-12 19:49:48 +04:00
Ilya Fedin
0b4ef3214e Leverage QImage's CoW in Linux native notifications 2023-09-12 10:29:29 +04:00
Ilya Fedin
e946bf5338 Run in background on Linux when minimization is not supported 2023-09-12 10:27:13 +04:00
Ilya Fedin
e8a1fc0300 Add a method to check whether to run in background instead of checking for macOS 2023-09-12 10:27:13 +04:00
Ilya Fedin
0bf0fb29d2 Add nodiscard for a bunch of platform specific methods 2023-09-12 10:27:13 +04:00
Ilya Fedin
566f2dd670 Switch XDP open with dialog to QWaylandWindow::requestXdgActivationToken 2023-09-11 11:12:08 +04:00
Ilya Fedin
e52e1672e8 Make PortalAutostart asynchronous 2023-09-11 11:11:40 +04:00
Ilya Fedin
bf255c0e00 Don't use crl::on_main unnecessarily in Linux native notifications code
All those dbus methods call callbacks on the same thread
2023-09-11 11:11:04 +04:00
Ilya Fedin
55fb3405e5 Move feature warnings to the relevant code 2023-09-11 11:05:05 +04:00
Ilya Fedin
483909854a Use brackets include for QtWaylandScanner-generated headers 2023-09-08 07:28:13 +04:00
Ilya Fedin
0079a18e97 Call D-Bus ReloadConfig asynchronously 2023-09-04 18:11:25 +04:00
23rd
98bb520f47 Adjusted code for refactor of input fields in lib_ui. 2023-09-04 17:36:54 +04:00
Ilya Fedin
4807244682 Don't use crl::on_main unnecessarily with XDP::SettingWatcher
g_dbus_connection_signal_subscribe calls the callback on the same thread
2023-09-04 16:21:58 +04:00
Ilya Fedin
396635fa1d Make use of the new window-less base::Platform::XDP::ParentWindowID 2023-08-25 10:21:25 +02:00
Ilya Fedin
4755be4ace Add missing returns to skip taskbar Linux abstraction 2023-08-24 11:44:06 +02:00
Ilya Fedin
07bbfd1353 Make dark mode update go through Qt code on Linux
This makes the behavior consistent and is possible now thanks to a Qt patch
2023-08-18 17:09:21 +02:00
John Preston
80fb506f84 Use underlying QPlatformSystemTrayIcon on Windows.
Fixes #26655.
2023-08-15 12:11:45 +02:00
John Preston
58c91be156 Fix location links with Bing Maps uninstalled.
Fixes #26506.
2023-08-11 11:47:18 +02:00
Ilya Fedin
786d8dd22e Get rid of QOpenGLWidget in main_window_mac
ui_window_mac has logic depending on Qt version to use Metal when possible, this will conflict once Qt is updated to 6.4+
2023-08-10 19:37:53 +04:00
Ilya Fedin
12eed5f433 Get optional string support in cppgir 2023-08-10 19:33:01 +04:00
Ilya Fedin
c2e96db358 Fix a typo in the LinuxIntegration event dispatcher warning 2023-08-06 21:20:10 +04:00
Ilya Fedin
1cad1966f7 Try to instantiate GApplication instance without nested event loop 2023-08-06 21:20:10 +04:00
Ilya Fedin
8669e6a891 Port GApplication to cppgir 2023-08-06 21:20:10 +04:00
Ilya Fedin
0e3e0c5b81 Do a D-Bus request instead of systemctl command for D-Bus config reload 2023-08-03 18:14:17 +04:00
Ilya Fedin
da55698a51 Generate GUID for GNotification
That's what g_application_send_notification does when ID is not passed and that simplifies the code
2023-08-03 18:12:55 +04:00
Ilya Fedin
cf781e1043 Port AppLaunchContext to cppgir 2023-08-03 18:11:31 +04:00
John Preston
8ec0bdcac9 Version 4.8.10: Fix build with GCC. 2023-07-28 21:46:41 +04:00
John Preston
8cc90c3373 Fix media viewer with MacBook top notch. 2023-07-25 12:30:52 +04:00
Ilya Fedin
272d2da04a Stabilize app id on Linux when -workdir is set to the default workdir
Currently the app id hash is generated from workdir path only when it's set explicitly and that's for a good reason: the default workdir could be changed (e.g. by creating a TelegramForcePortable) and app id would change what would result in a duplicate .desktop created.

The current code has the possibility of having duplicate .desktop files, too, as it happened, but by specifying -workdir to the same directory as the default one.

There's now a check that ensures the specified workdir is really custom so those duplicate launchers could be removed what should really stabilize the hash.
2023-07-24 10:37:38 +04:00
Ilya Fedin
30c73fbdf2 Fix D-Bus service with non-standard workdir or backslash in the path
Working dir not set leads to unrelevant instance being launched with unrelevant bus name and entire launchf fails.

D-Bus service files also don't need backslash escaping unlike the .desktop files.
2023-07-21 17:53:24 +04:00
Ilya Fedin
3cb49127f4 Make a weak pointer for GApplication startup lambda
Or it never gets destroyed
2023-07-21 06:48:57 +04:00
Ilya Fedin
9ccb11bd1a Avoid using const_string for constant consumed by std::string 2023-07-20 21:39:06 +04:00
Ilya Fedin
d60d80ba63 Reuse lib_ui's title control side deduction code 2023-07-20 17:58:41 +04:00