Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access/Dialog: Center and keep above on wayland #114

Merged
merged 6 commits into from
Aug 15, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y libgranite-7-dev libgtk-4-dev meson valac
apt install -y libgranite-7-dev libgtk-4-dev libpantheon-wayland-1-dev meson valac
- name: Build
run: |
meson build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
GIT_USER_NAME: "elementaryBot"
GIT_USER_EMAIL: "[email protected]"
with:
release_branch: 'horus'
release_branch: 'noble'
12 changes: 12 additions & 0 deletions data/portals.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
<update_contact>contact_at_elementary.io</update_contact>

<releases>
<release version="8.0.0" data="2024-08-15" urgency="medium">
<description>
<p>New Features:</p>
<ul>
<li>Updated translations</li>
</ul>
</description>
<issues>
<issue url="https://github.com/elementary/portals/issues/115">Center and Keep on Top display settings dialog</issue>
</issues>
</release>

<release version="7.2.0" data="2024-07-24" urgency="medium">
<description>
<p>New Features:</p>
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if meson.get_compiler('vala').version().version_compare('>=0.56.1')
]
endif

pantheon_wayland_dep = dependency('pantheon-wayland-1')
x11_dep = dependency('x11')

add_project_arguments(
Expand Down
10 changes: 9 additions & 1 deletion src/Access/Dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

[DBus (name = "org.freedesktop.impl.portal.Request")]
public class Access.Dialog : Granite.MessageDialog {
public class Access.Dialog : Granite.MessageDialog, PantheonWayland.ExtendedBehavior {
public enum ButtonAction {
SUGGESTED,
DESTRUCTIVE
Expand Down Expand Up @@ -73,6 +73,14 @@ public class Access.Dialog : Granite.MessageDialog {

custom_bin.orientation = Gtk.Orientation.VERTICAL;
custom_bin.spacing = 6;

if (parent_window == "") {
child.realize.connect (() => {
connect_to_shell ();
make_centered ();
set_keep_above ();
});
}
}

public override void show () {
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ executable(
gio_dep,
granite_dep,
gtk_deps,
pantheon_wayland_dep,
x11_dep
],
install: true,
Expand Down
Loading