Skip to content

Commit 748fc28

Browse files
committed
Merge branch 'main' into leolost/make-modal
2 parents fa27445 + 879ae02 commit 748fc28

File tree

390 files changed

+31289
-26956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

390 files changed

+31289
-26956
lines changed

.github/workflows/gettext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Gettext Updates
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66

77
jobs:
88
build:

.github/workflows/main.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
version: [stable, unstable, development-target]
1919
include:
2020
- version: stable
21-
mutter_pkg: libmutter-10-dev
21+
mutter_pkg: libmutter-14-dev
2222
- version: unstable
23-
mutter_pkg: libmutter-10-dev
23+
mutter_pkg: libmutter-14-dev
2424
- version: development-target
2525
mutter_pkg: libmutter-14-dev
2626
container:
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install Dependencies
3232
run: |
3333
apt update
34-
apt install -y gettext gnome-settings-daemon-dev gsettings-desktop-schemas-dev libcanberra-dev libclutter-1.0-dev libgee-0.8-dev libglib2.0-dev libgnome-desktop-3-dev libgranite-dev libgtk-3-dev ${{ matrix.mutter_pkg }} libxml2-utils libsqlite3-dev meson valac valadoc
34+
apt install -y gettext gsettings-desktop-schemas-dev libatk-bridge2.0-dev libcanberra-dev libclutter-1.0-dev libgee-0.8-dev libglib2.0-dev libgnome-desktop-3-dev libgranite-dev libgtk-3-dev ${{ matrix.mutter_pkg }} libxml2-utils libsqlite3-dev meson valac valadoc
3535
- name: Build
3636
env:
3737
DESTDIR: out
@@ -40,6 +40,24 @@ jobs:
4040
ninja -C build
4141
ninja -C build install
4242
43+
fedora:
44+
runs-on: ubuntu-latest
45+
46+
container:
47+
image: fedora:latest
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
- name: Install Dependencies
52+
run: |
53+
dnf install -y desktop-file-utils gettext gsettings-desktop-schemas-devel atk-devel libcanberra-devel clutter-devel libgee-devel glib2-devel gnome-desktop3-devel granite-devel granite-7-devel gtk3-devel gtk4-devel libhandy-devel mutter-devel xml2 sqlite-devel meson valac valadoc
54+
- name: Build
55+
env:
56+
DESTDIR: out
57+
run: |
58+
meson build
59+
ninja -C build install
60+
4361
lint:
4462

4563
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Release
22

33
on:
44
pull_request:
5-
branches: [master]
5+
branches: [main]
66
types: [closed]
7+
78
jobs:
89
release:
910
runs-on: ubuntu-22.04
@@ -16,4 +17,4 @@ jobs:
1617
GIT_USER_NAME: "elementaryBot"
1718
GIT_USER_EMAIL: "[email protected]"
1819
with:
19-
release_branch: 'horus'
20+
release_branch: 'noble'

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ A window & compositing manager based on libmutter and designed by elementary for
66
## Building, Testing, and Installation
77

88
You'll need the following dependencies:
9-
* meson
109
* gettext (>= 0.19.6)
1110
* gsettings-desktop-schemas-dev
1211
* libcanberra-dev
1312
* libclutter-1.0-dev (>= 1.12.0)
1413
* libgee-0.8-dev
15-
* libglib2.0-dev (>= 2.44)
14+
* libglib2.0-dev (>= 2.74)
1615
* libgnome-desktop-3-dev
1716
* libgranite-dev (>= 5.4.0)
1817
* libgtk-3-dev (>= 3.10.0)
1918
* libmutter-10-dev (>= 42.0) | libmutter-dev (>= 3.18.3)
2019
* libxml2-utils
20+
* meson (>= 0.59.0)
2121
* valac (>= 0.46.0)
2222

2323
Run `meson build` to configure the build environment. Change to the build directory and run `ninja` to build

build-aux/meson/post_install.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

daemon-gtk3/WindowMenu.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
public class Gala.Daemon.WindowMenu : Gtk.Menu {
7-
private static GLib.Settings gala_keybind_settings = new GLib.Settings ("org.pantheon.desktop.gala.keybindings");
7+
private static GLib.Settings gala_keybind_settings = new GLib.Settings ("io.elementary.desktop.wm.keybindings");
88
private static GLib.Settings keybind_settings = new GLib.Settings ("org.gnome.desktop.wm.keybindings");
99

1010
public signal void perform_action (Gala.ActionType type);

daemon/DBus.vala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
public enum Gala.ActionType {
77
NONE = 0,
8-
SHOW_WORKSPACE_VIEW,
8+
SHOW_MULTITASKING_VIEW,
99
MAXIMIZE_CURRENT,
1010
HIDE_CURRENT,
1111
OPEN_LAUNCHER,
@@ -164,6 +164,15 @@ public class Gala.Daemon.DBus : GLib.Object {
164164
}
165165

166166
private void show_menu (Gtk.Popover menu, int display_width, int display_height, int x, int y) {
167+
if (!DisplayConfig.is_logical_layout ()) {
168+
var scale_factor = window.scale_factor;
169+
170+
display_width /= scale_factor;
171+
display_height /= scale_factor;
172+
x /= scale_factor;
173+
y /= scale_factor;
174+
}
175+
167176
window.default_width = display_width;
168177
window.default_height = display_height;
169178
window.present ();

daemon/DisplayConfig.vala

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Copyright 2024-2025 elementary, Inc. (https://elementary.io)
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
6+
[DBus (name = "org.gnome.Mutter.DisplayConfig")]
7+
public interface Gala.Daemon.DisplayConfig : Object {
8+
private static bool? _is_logical_layout = null;
9+
private static DisplayConfig? proxy = null;
10+
11+
public static bool is_logical_layout () {
12+
if (_is_logical_layout == null) {
13+
init ();
14+
}
15+
16+
return _is_logical_layout;
17+
}
18+
19+
private static void init () {
20+
try {
21+
proxy = Bus.get_proxy_sync (BusType.SESSION, "org.gnome.Mutter.DisplayConfig", "/org/gnome/Mutter/DisplayConfig");
22+
proxy.monitors_changed.connect (update);
23+
} catch (Error e) {
24+
critical (e.message);
25+
_is_logical_layout = true;
26+
return;
27+
}
28+
29+
update ();
30+
}
31+
32+
private static void update () {
33+
uint current_serial;
34+
MutterReadMonitor[] mutter_monitors;
35+
MutterReadLogicalMonitor[] mutter_logical_monitors;
36+
GLib.HashTable<string, GLib.Variant> properties;
37+
try {
38+
proxy.get_current_state (out current_serial, out mutter_monitors, out mutter_logical_monitors, out properties);
39+
} catch (Error e) {
40+
critical (e.message);
41+
_is_logical_layout = true;
42+
return;
43+
}
44+
45+
uint layout_mode = 1; // Absence of "layout-mode" means logical (= 1) according to the documentation.
46+
var layout_mode_variant = properties.lookup ("layout-mode");
47+
if (layout_mode_variant != null) {
48+
layout_mode = layout_mode_variant.get_uint32 ();
49+
}
50+
51+
_is_logical_layout = layout_mode == 1;
52+
}
53+
54+
public signal void monitors_changed ();
55+
public abstract void get_current_state (out uint serial, out MutterReadMonitor[] monitors, out MutterReadLogicalMonitor[] logical_monitors, out GLib.HashTable<string, GLib.Variant> properties) throws Error;
56+
}
57+
58+
public struct MutterReadMonitorInfo {
59+
public string connector;
60+
public string vendor;
61+
public string product;
62+
public string serial;
63+
public uint hash {
64+
get {
65+
return (connector + vendor + product + serial).hash ();
66+
}
67+
}
68+
}
69+
70+
public struct MutterReadMonitorMode {
71+
public string id;
72+
public int width;
73+
public int height;
74+
public double frequency;
75+
public double preferred_scale;
76+
public double[] supported_scales;
77+
public GLib.HashTable<string, GLib.Variant> properties;
78+
}
79+
80+
public struct MutterReadMonitor {
81+
public MutterReadMonitorInfo monitor;
82+
public MutterReadMonitorMode[] modes;
83+
public GLib.HashTable<string, GLib.Variant> properties;
84+
}
85+
86+
public struct MutterReadLogicalMonitor {
87+
public int x;
88+
public int y;
89+
public double scale;
90+
public uint transform;
91+
public bool primary;
92+
public MutterReadMonitorInfo[] monitors;
93+
public GLib.HashTable<string, GLib.Variant> properties;
94+
}

daemon/WindowMenu.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
public class Gala.Daemon.WindowMenu : Gtk.Popover {
7-
private static GLib.Settings gala_keybind_settings = new GLib.Settings ("org.pantheon.desktop.gala.keybindings");
7+
private static GLib.Settings gala_keybind_settings = new GLib.Settings ("io.elementary.desktop.wm.keybindings");
88
private static GLib.Settings keybind_settings = new GLib.Settings ("org.gnome.desktop.wm.keybindings");
99

1010
public signal void perform_action (Gala.ActionType type) {

daemon/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
gala_daemon_sources = files(
22
'Main.vala',
3+
'DisplayConfig.vala',
34
'DBus.vala',
45
'MonitorLabel.vala',
56
'Window.vala',

0 commit comments

Comments
 (0)