Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Comment thread
ryonakano marked this conversation as resolved.
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>
14 changes: 8 additions & 6 deletions protocol/pantheon-desktop-shell.vapi
Comment thread
danirabbit marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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)]
Expand Down Expand Up @@ -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_")]
Expand All @@ -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);
}
}
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