From 9b2447558009fc849b10462eb7ad49771c0dbbfa Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 15 Nov 2025 11:56:38 +0300 Subject: [PATCH 1/2] X11: Avoid using present --- src/AbstractBubble.vala | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/AbstractBubble.vala b/src/AbstractBubble.vala index 711deb7..53974b7 100644 --- a/src/AbstractBubble.vala +++ b/src/AbstractBubble.vala @@ -101,6 +101,7 @@ public class Notifications.AbstractBubble : Gtk.Window { add_css_class ("notification"); // Prevent stealing focus when an app window is closed can_focus = false; + focusable = false; set_titlebar (new Gtk.Grid ()); carousel.page_changed.connect (on_page_changed); @@ -162,7 +163,12 @@ public class Notifications.AbstractBubble : Gtk.Window { timeout_id = 0; } - base.present (); + if (Gdk.Display.get_default () is Gdk.X11.Display) { + // Avoid present on X11 because it focuses the window + base.show (); + } else { + base.present (); + } if (timeout != 0) { timeout_id = Timeout.add (timeout, timeout_expired); @@ -218,10 +224,12 @@ public class Notifications.AbstractBubble : Gtk.Window { private void x11_make_notification () { unowned var display = Gdk.Display.get_default (); if (display is Gdk.X11.Display) { - unowned var xdisplay = ((Gdk.X11.Display) display).get_xdisplay (); - - var window = ((Gdk.X11.Surface) get_surface ()).get_xid (); + unowned var x11_surface = (Gdk.X11.Surface) get_surface (); + var window = (x11_surface).get_xid (); + x11_surface.set_skip_pager_hint (true); + x11_surface.set_skip_taskbar_hint (true); + unowned var xdisplay = ((Gdk.X11.Display) display).get_xdisplay (); var atom = xdisplay.intern_atom ("_NET_WM_WINDOW_TYPE", false); var notification_atom = xdisplay.intern_atom ("_NET_WM_WINDOW_TYPE_NOTIFICATION", false); From c26b57ea6f1e6f39eda3f59783d55be2cc146b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Thu, 20 Nov 2025 09:30:58 -0800 Subject: [PATCH 2/2] Update notifications.metainfo.xml.in --- data/notifications.metainfo.xml.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/notifications.metainfo.xml.in b/data/notifications.metainfo.xml.in index d5e1636..b570ad0 100644 --- a/data/notifications.metainfo.xml.in +++ b/data/notifications.metainfo.xml.in @@ -40,6 +40,9 @@
  • Updated translations
  • + + Notification Focus Settings +