Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions data/quick-settings.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
<update_contact>contact_at_elementary.io</update_contact>

<releases>
<release version="1.4.0" date="2025-12-01" urgency="medium">
<description>
<p>Other Improvements:</p>
<ul>
<li>Updated translations</li>
</ul>
</description>
<issues>
<issue url="https://github.com/elementary/quick-settings/issues/45">End Session Dialog should pull visual focus</issue>
</issues>
</release>

<release version="1.3.0" date="2025-09-11" urgency="medium">
<description>
<p>Other Improvements:</p>
Expand Down
18 changes: 18 additions & 0 deletions protocol/pantheon-desktop-shell-v1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@

<interface name="io_elementary_pantheon_extended_behavior_v1" version="1">
<request name="destroy" type="destructor"/>

<request name="set_keep_above">
<description summary="set keep above">
Tell the shell to keep the surface above on all workspaces
Expand All @@ -118,5 +119,22 @@
to not be granted automatically but having to be requested via focus.
</description>
</request>

<request name="focus">
<description summary="request keyboard 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.
</description>
</request>

<request name="make_modal">
<description summary="requests to make a surface system modal">
This will block all user input outside the surface and most system shortcuts.
</description>

<arg name="dim" type="uint" summary="1 to dim, 0 to not dim"/>
</request>
</interface>
</protocol>
26 changes: 12 additions & 14 deletions protocol/pantheon-desktop-shell.vapi
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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);
}
}
3 changes: 2 additions & 1 deletion src/Widgets/EndSessionDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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<Pantheon.Desktop.Shell> (name, ref Pantheon.Desktop.Shell.iface, uint32.min (version, 1));
var desktop_shell = wl_registry.bind<PantheonDesktop.Shell> (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);
}
}
}
Expand Down