mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Use XDP::kObjectPath for session and request paths
This commit is contained in:
parent
a66b886c51
commit
1e9b7e2726
3 changed files with 6 additions and 5 deletions
|
@ -252,7 +252,8 @@ void LinuxIntegration::initInhibit() {
|
|||
const auto sessionHandleToken = "tdesktop"
|
||||
+ std::to_string(base::RandomValue<uint>());
|
||||
|
||||
const auto sessionHandle = "/org/freedesktop/portal/desktop/session/"
|
||||
const auto sessionHandle = base::Platform::XDP::kObjectPath
|
||||
+ std::string("/session/")
|
||||
+ uniqueName
|
||||
+ '/'
|
||||
+ sessionHandleToken;
|
||||
|
|
|
@ -66,8 +66,8 @@ bool ShowXDPOpenWithDialog(const QString &filepath) {
|
|||
uniqueName.erase(0, 1);
|
||||
uniqueName.replace(uniqueName.find('.'), 1, 1, '_');
|
||||
|
||||
const auto requestPath = Glib::ustring(
|
||||
"/org/freedesktop/portal/desktop/request/")
|
||||
const auto requestPath = base::Platform::XDP::kObjectPath
|
||||
+ Glib::ustring("/request/")
|
||||
+ uniqueName
|
||||
+ '/'
|
||||
+ handleToken;
|
||||
|
|
|
@ -105,8 +105,8 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
|||
uniqueName.erase(0, 1);
|
||||
uniqueName.replace(uniqueName.find('.'), 1, 1, '_');
|
||||
|
||||
const auto requestPath = Glib::ustring(
|
||||
"/org/freedesktop/portal/desktop/request/")
|
||||
const auto requestPath = base::Platform::XDP::kObjectPath
|
||||
+ Glib::ustring("/request/")
|
||||
+ uniqueName
|
||||
+ '/'
|
||||
+ handleToken;
|
||||
|
|
Loading…
Add table
Reference in a new issue