update-notifier: update wayland support patch

This commit is contained in:
Luis Guzmán 2025-06-06 12:23:11 -06:00
parent 40d46056ff
commit 857bdc6eea
6 changed files with 65 additions and 65 deletions

View file

@ -1,3 +1,5 @@
# Check updates with update-notifier instead of aptdaemon
diff -ru a/data/backend_helper.py b/data/backend_helper.py
--- a/data/backend_helper.py 2023-04-30 21:20:07.986410268 -0400
+++ b/data/backend_helper.py 2023-04-30 21:35:59.442841302 -0400

View file

@ -1,3 +1,5 @@
# Reduce the timeout to refresh the status of the tray icon
diff -ru a/src/update-notifier.c b/src/update-notifier.c
--- a/src/update-notifier.c 2023-05-01 12:24:36.171054235 -0400
+++ b/src/update-notifier.c 2023-05-01 13:54:27.833304128 -0400

View file

@ -0,0 +1,14 @@
# Actually show the indicator icon
diff --git a/src/update.c b/src/update.c
index 588fa66..951a24f 100644
--- a/src/update.c
+++ b/src/update.c
@@ -687,7 +687,6 @@ update_check (TrayApplet *ta)
g_child_watch_add (pid, launch_update_manager, NULL);
}
- return TRUE;
// if we are already visible, skip the rest
if(tray_applet_ui_get_visible (ta))

View file

@ -0,0 +1,30 @@
diff --git a/src/update-notifier.c b/src/update-notifier.c
index ea81f78f..4c678b2e 100644
--- a/src/update-notifier.c
+++ b/src/update-notifier.c
@@ -163,6 +163,7 @@ void invoke(const gchar *cmd, const gchar *desktop, gboolean with_pkexec)
// normal launch
context = gdk_display_get_app_launch_context (gdk_display_get_default ());
+ #ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) {
// fake window to get the current server time *urgh*
if (!w) {
@@ -172,8 +173,16 @@ void invoke(const gchar *cmd, const gchar *desktop, gboolean with_pkexec)
guint32 timestamp = gdk_x11_get_server_time (gtk_widget_get_window (w));
gdk_app_launch_context_set_timestamp (context, timestamp);
+ } else {
+ guint32 timestamp = (guint32) (g_get_monotonic_time () / 1000);
+ gdk_app_launch_context_set_timestamp (context, timestamp);
}
-
+ #else
+ {
+ guint32 timestamp = (guint32) (g_get_monotonic_time () / 1000);
+ gdk_app_launch_context_set_timestamp (context, timestamp);
+ }
+ #endif
appinfo = g_app_info_create_from_commandline(cmd,
cmd,
G_APP_INFO_CREATE_NONE,

View file

@ -0,0 +1,16 @@
--- a/debian/control 2023-04-06 12:43:17.147156435 -0600
+++ b/debian/control 2023-04-06 12:46:32.883071182 -0600
@@ -34,11 +34,9 @@
ubuntu-release-upgrader-gtk,
gnome-shell <!s390x> | notification-daemon <!s390x>,
policykit-1
-Recommends: apport-gtk (>=2.8-0ubuntu3),
- python3-aptdaemon.gtk3widgets | synaptic (>= 0.75.12),
+Recommends: python3-aptdaemon.gtk3widgets | synaptic (>= 0.75.12),
software-properties-gtk,
- python3-aptdaemon,
- whoopsie (>= 0.2.77)
+ python3-aptdaemon
Description: Daemon which notifies about package updates
Puts an icon in the user's notification area when package updates are
available.