From 4585cc0b806c96d99adaa06a38a7a63939a3fcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 2 Dec 2025 10:07:30 -0800 Subject: [PATCH 1/3] EndSessionDialog: use modal shell protocol --- protocol/pantheon-desktop-shell-v1.xml | 18 ++++++++++++++++++ protocol/pantheon-desktop-shell.vapi | 14 ++++++++------ src/Widgets/EndSessionDialog.vala | 3 ++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/protocol/pantheon-desktop-shell-v1.xml b/protocol/pantheon-desktop-shell-v1.xml index 710b9d3a..d8bdad7f 100644 --- a/protocol/pantheon-desktop-shell-v1.xml +++ b/protocol/pantheon-desktop-shell-v1.xml @@ -106,6 +106,7 @@ + Tell the shell to keep the surface above on all workspaces @@ -118,5 +119,22 @@ to not be granted automatically but having to be requested via focus. + + + + Request keyboard focus, taking it away from any other window. + Keyboard focus must always be manually be requested and is + - in contrast to normal windows - never automatically granted + by the compositor. + + + + + + This will block all user input outside the surface and most system shortcuts. + + + + diff --git a/protocol/pantheon-desktop-shell.vapi b/protocol/pantheon-desktop-shell.vapi index f011ca2e..ec547e74 100644 --- a/protocol/pantheon-desktop-shell.vapi +++ b/protocol/pantheon-desktop-shell.vapi @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -namespace Pantheon.Desktop { +namespace PantheonDesktop { [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_shell_v1", cprefix = "io_elementary_pantheon_shell_v1_")] public class Shell : Wl.Proxy { [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "io_elementary_pantheon_shell_v1_interface")] @@ -13,9 +13,9 @@ namespace Pantheon.Desktop { public void* get_user_data (); public uint32 get_version (); public void destroy (); - public Pantheon.Desktop.Panel get_panel (Wl.Surface surface); - public Pantheon.Desktop.Widget get_widget (Wl.Surface surface); - public Pantheon.Desktop.ExtendedBehavior get_extended_behavior (Wl.Surface surface); + public PantheonDesktop.Panel get_panel (Wl.Surface surface); + public PantheonDesktop.Widget get_widget (Wl.Surface surface); + public PantheonDesktop.ExtendedBehavior get_extended_behavior (Wl.Surface surface); } [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "enum io_elementary_pantheon_panel_v1_anchor", cprefix="IO_ELEMENTARY_PANTHEON_PANEL_V1_ANCHOR_", has_type_id = false)] @@ -43,10 +43,10 @@ namespace Pantheon.Desktop { public void* get_user_data (); public uint32 get_version (); public void destroy (); - public void set_anchor (Pantheon.Desktop.Anchor anchor); + public void set_anchor (PantheonDesktop.Anchor anchor); public void focus (); public void set_size (int width, int height); - public void set_hide_mode (Pantheon.Desktop.HideMode hide_mode); + public void set_hide_mode (PantheonDesktop.HideMode hide_mode); } [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_widget_v1", cprefix = "io_elementary_pantheon_widget_v1_")] @@ -69,5 +69,7 @@ namespace Pantheon.Desktop { public void destroy (); public void set_keep_above (); public void make_centered (); + public void focus (); + public void make_modal (uint dim); } } diff --git a/src/Widgets/EndSessionDialog.vala b/src/Widgets/EndSessionDialog.vala index 204d04c1..7fd00b3d 100644 --- a/src/Widgets/EndSessionDialog.vala +++ b/src/Widgets/EndSessionDialog.vala @@ -155,13 +155,14 @@ public class QuickSettings.EndSessionDialog : Granite.MessageDialog { public void registry_handle_global (Wl.Registry wl_registry, uint32 name, string @interface, uint32 version) { if (@interface == "io_elementary_pantheon_shell_v1") { - var desktop_shell = wl_registry.bind (name, ref Pantheon.Desktop.Shell.iface, uint32.min (version, 1)); + var desktop_shell = wl_registry.bind (name, ref PantheonDesktop.Shell.iface, uint32.min (version, 1)); unowned var window = get_window (); if (window is Gdk.Wayland.Window) { unowned var wl_surface = ((Gdk.Wayland.Window) window).get_wl_surface (); var extended_behavior = desktop_shell.get_extended_behavior (wl_surface); extended_behavior.set_keep_above (); extended_behavior.make_centered (); + extended_behavior.make_modal (1); } } } From 37908f38f3d1bd6db018ce2300d5fa1e70fd695a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 2 Dec 2025 10:13:52 -0800 Subject: [PATCH 2/3] Update quick-settings.metainfo.xml --- data/quick-settings.metainfo.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/data/quick-settings.metainfo.xml b/data/quick-settings.metainfo.xml index b586f591..e1a40e93 100644 --- a/data/quick-settings.metainfo.xml +++ b/data/quick-settings.metainfo.xml @@ -31,6 +31,18 @@ contact_at_elementary.io + + +

Other Improvements:

+
    +
  • Updated translations
  • +
+
+ + End Session Dialog should pull visual focus + +
+

Other Improvements:

From a0b9ee6601108fcf9f96fddeb04db00378893ec0 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Mon, 5 Jan 2026 02:23:31 +0900 Subject: [PATCH 3/3] Import latest pantheon-desktop-shell.vapi from pantheon-wayland (#142) --- protocol/pantheon-desktop-shell.vapi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/protocol/pantheon-desktop-shell.vapi b/protocol/pantheon-desktop-shell.vapi index ec547e74..a383e8b5 100644 --- a/protocol/pantheon-desktop-shell.vapi +++ b/protocol/pantheon-desktop-shell.vapi @@ -5,14 +5,13 @@ */ namespace PantheonDesktop { - [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_shell_v1", cprefix = "io_elementary_pantheon_shell_v1_")] + [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_shell_v1", cprefix = "io_elementary_pantheon_shell_v1_", free_function = "io_elementary_pantheon_shell_v1_destroy")] public class Shell : Wl.Proxy { [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "io_elementary_pantheon_shell_v1_interface")] public static Wl.Interface iface; public void set_user_data (void* user_data); public void* get_user_data (); public uint32 get_version (); - public void destroy (); public PantheonDesktop.Panel get_panel (Wl.Surface surface); public PantheonDesktop.Widget get_widget (Wl.Surface surface); public PantheonDesktop.ExtendedBehavior get_extended_behavior (Wl.Surface surface); @@ -35,38 +34,35 @@ namespace PantheonDesktop { ALWAYS } - [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_panel_v1", cprefix = "io_elementary_pantheon_panel_v1_")] + [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_panel_v1", cprefix = "io_elementary_pantheon_panel_v1_", free_function = "io_elementary_pantheon_panel_v1_destroy")] public class Panel : Wl.Proxy { [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "io_elementary_pantheon_panel_v1_interface")] public static Wl.Interface iface; public void set_user_data (void* user_data); public void* get_user_data (); public uint32 get_version (); - public void destroy (); public void set_anchor (PantheonDesktop.Anchor anchor); public void focus (); public void set_size (int width, int height); public void set_hide_mode (PantheonDesktop.HideMode hide_mode); } - [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_widget_v1", cprefix = "io_elementary_pantheon_widget_v1_")] + [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_widget_v1", cprefix = "io_elementary_pantheon_widget_v1_", free_function = "io_elementary_pantheon_widget_v1_destroy")] public class Widget : Wl.Proxy { [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "io_elementary_pantheon_widget_v1_interface")] public static Wl.Interface iface; public void set_user_data (void* user_data); public void* get_user_data (); public uint32 get_version (); - public void destroy (); } - [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_extended_behavior_v1", cprefix = "io_elementary_pantheon_extended_behavior_v1_")] + [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_extended_behavior_v1", cprefix = "io_elementary_pantheon_extended_behavior_v1_", free_function = "io_elementary_pantheon_extended_behavior_v1_destroy")] public class ExtendedBehavior : Wl.Proxy { [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "io_elementary_pantheon_extended_behavior_v1_interface")] public static Wl.Interface iface; public void set_user_data (void* user_data); public void* get_user_data (); public uint32 get_version (); - public void destroy (); public void set_keep_above (); public void make_centered (); public void focus ();