aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRatchanan Srirattanamet <ratchanan@ubports.com>2023-12-07 02:20:08 +0700
committerRatchanan Srirattanamet <ratchanan@ubports.com>2023-12-07 02:20:08 +0700
commit6f1c3f7f25052c1f4c001e30bc8368359531af87 (patch)
tree3ed26119d8ad9fb515a1214b815bc48a2a220c44 /src
parent2aace1535ca5dd971b2ac7b796b8eaa03c11bd96 (diff)
downloadayatana-indicator-datetime-6f1c3f7f25052c1f4c001e30bc8368359531af87.tar.gz
ayatana-indicator-datetime-6f1c3f7f25052c1f4c001e30bc8368359531af87.tar.bz2
ayatana-indicator-datetime-6f1c3f7f25052c1f4c001e30bc8368359531af87.zip
Bring back Lomiri-specific notification hints
As discussed in [1], Lomiri has a custom logic in notification timeout and require the custom hint for timeout to work correctly. Restore the hints from commit 0a88a8d7 ("Remove osd-notify remnants and use native notification timeout"), while keeping the standard timeout in place. Lomiri will ignore standard timeout, while other DE's will ignore the extra hint. [1] https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/32#note_1552217874
Diffstat (limited to 'src')
-rw-r--r--src/notifications.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/notifications.cpp b/src/notifications.cpp
index b962e68..a2a1fc3 100644
--- a/src/notifications.cpp
+++ b/src/notifications.cpp
@@ -249,6 +249,10 @@ public:
const auto& d= info.m_duration;
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(d);
notify_notification_set_timeout (nn.get (), ms.count ());
+ // Lomiri has its own logic regarding timeout.
+ notify_notification_set_hint (nn.get(),
+ HINT_LOMIRI_TIMEOUT,
+ g_variant_new_int32(ms.count()));
}
for (const auto& hint : info.m_string_hints)
@@ -509,6 +513,8 @@ private:
// server capabilities.
// as the name indicates, don't use this directly: use server_caps() instead
mutable std::set<std::string> m_lazy_caps;
+
+ static constexpr char const * HINT_LOMIRI_TIMEOUT {"x-lomiri-snap-decisions-timeout"};
};
/***