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:

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..a383e8b5 100644 --- a/protocol/pantheon-desktop-shell.vapi +++ b/protocol/pantheon-desktop-shell.vapi @@ -4,18 +4,17 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -namespace Pantheon.Desktop { - [CCode (cheader_filename = "pantheon-desktop-shell-client-protocol.h", cname = "struct io_elementary_pantheon_shell_v1", cprefix = "io_elementary_pantheon_shell_v1_")] +namespace PantheonDesktop { + [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 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)] @@ -35,39 +34,38 @@ namespace Pantheon.Desktop { 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 (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_")] + [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 (); + 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); } } }