diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f00107e..257e660 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,4 +16,4 @@ jobs: GIT_USER_NAME: "elementaryBot" GIT_USER_EMAIL: "builds@elementary.io" with: - release_branch: "noble" + release_branch: "resolute" diff --git a/meson.build b/meson.build index d869ee2..b633183 100644 --- a/meson.build +++ b/meson.build @@ -37,8 +37,6 @@ executable( dependency ('granite-7', version: '>=7.7.0'), dependency ('gtk4'), dependency('gtk4-wayland'), - dependency('gtk4-x11'), - dependency ('gtk4-x11'), dependency ('libadwaita-1'), dependency('wayland-client'), pantheon_desktop_shell_dep diff --git a/src/AbstractBubble.vala b/src/AbstractBubble.vala index 197fe0b..f0a90a1 100644 --- a/src/AbstractBubble.vala +++ b/src/AbstractBubble.vala @@ -115,13 +115,8 @@ public class Notifications.AbstractBubble : Gtk.Window { accessible_role = ALERT; child.realize.connect (() => { - if (Gdk.Display.get_default () is Gdk.Wayland.Display) { - // We have to wrap in Idle otherwise the Meta.Window of the WaylandSurface in Gala is still null - Idle.add_once (init_wl); - } else { - x11_make_notification (); - x11_update_mutter_hints (); - } + // We have to wrap in Idle otherwise the Meta.Window of the WaylandSurface in Gala is still null + Idle.add_once (init_wl); }); carousel.notify["position"].connect (update_swipe_progress); @@ -154,8 +149,6 @@ public class Notifications.AbstractBubble : Gtk.Window { get_blur_margins (out left, out right); desktop_panel.add_blur (left, right, 16, 16, 9); - } else if (Gdk.Display.get_default () is Gdk.X11.Display) { - x11_update_mutter_hints (); } } @@ -165,12 +158,7 @@ public class Notifications.AbstractBubble : Gtk.Window { timeout_id = 0; } - if (Gdk.Display.get_default () is Gdk.X11.Display) { - // Avoid present on X11 because it focuses the window - base.show (); - } else { - base.present (); - } + base.present (); if (timeout != 0) { timeout_id = Timeout.add (timeout, timeout_expired); @@ -206,42 +194,6 @@ public class Notifications.AbstractBubble : Gtk.Window { right = (int) (16 - distance).clamp (0, width); } - private void x11_update_mutter_hints () { - 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 (); - var prop = xdisplay.intern_atom ("_MUTTER_HINTS", false); - - int left, right; - get_blur_margins (out left, out right); - - var value = "blur=%d,%d,16,16,9".printf (left, right); - - xdisplay.change_property (window, prop, X.XA_STRING, 8, 0, (uchar[]) value, value.length); - } - } - - private void x11_make_notification () { - unowned var display = Gdk.Display.get_default (); - if (display is Gdk.X11.Display) { - 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); - - // (X.Atom) 4 is XA_ATOM - // 32 is format - // 0 means replace - xdisplay.change_property (window, atom, (X.Atom) 4, 32, 0, (uchar[]) notification_atom, 1); - } - } - private static Wl.RegistryListener registry_listener; private void init_wl () { registry_listener.global = registry_handle_global; diff --git a/src/CanberraGtk4.vala b/src/CanberraGtk4.vala index 72633a9..d285490 100644 --- a/src/CanberraGtk4.vala +++ b/src/CanberraGtk4.vala @@ -36,15 +36,6 @@ namespace CanberraGtk4 { } unowned var display = Gdk.Display.get_default (); - if (display is Gdk.X11.Display) { - unowned var display_name = display.get_name (); - if (display_name != null) { - proplist.sets (Canberra.PROP_WINDOW_X11_SCREEN, display_name); - } - - var screen = "%i".printf (((Gdk.X11.Display) display).get_screen ().get_screen_number ()); - proplist.sets (Canberra.PROP_WINDOW_X11_SCREEN, screen); - } context.change_props_full (proplist);