Skip to content

Commit c0520b4

Browse files
authored
Merge branch 'main' into lenemter/drop-windows-directly
2 parents 7161c04 + 8cfd4af commit c0520b4

Some content is hidden

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

65 files changed

+2053
-263
lines changed

.github/workflows/gettext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
apt-get install git -y
1818
1919
- name: Clone repository
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121
with:
2222
token: ${{ secrets.GIT_USER_TOKEN }}
2323

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
image: ghcr.io/elementary/docker:${{ matrix.version }}
2828

2929
steps:
30-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v5
3131
- name: Install Dependencies
3232
run: |
3333
apt update
@@ -47,7 +47,7 @@ jobs:
4747
image: fedora:latest
4848

4949
steps:
50-
- uses: actions/checkout@v4
50+
- uses: actions/checkout@v5
5151
- name: Install Dependencies
5252
run: |
5353
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 sqlite-devel meson valac valadoc
@@ -70,7 +70,7 @@ jobs:
7070
zypper addrepo https://download.opensuse.org/repositories/X11:Pantheon/15.6/X11:Pantheon.repo
7171
zypper --gpg-auto-import-keys refresh
7272
zypper --non-interactive install tar git desktop-file-utils gsettings-desktop-schemas-devel libatk-1_0-0 libcanberra-devel clutter-devel libgee-devel glib2-devel libgnome-desktop-3-devel granite6-devel granite-devel gtk3-devel gtk4-devel libhandy-devel mutter-devel sqlite3-devel meson vala valadoc gcc
73-
- uses: actions/checkout@v4
73+
- uses: actions/checkout@v5
7474
- name: Build
7575
env:
7676
DESTDIR: out
@@ -85,7 +85,7 @@ jobs:
8585
image: valalang/lint
8686

8787
steps:
88-
- uses: actions/checkout@v4
88+
- uses: actions/checkout@v5
8989
- name: Lint
9090
run: |
9191
io.elementary.vala-lint -d daemon

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release')
1212
steps:
13-
- uses: actions/checkout@v4
14-
- uses: elementary/actions/release@master
13+
- uses: actions/checkout@v5
14+
- uses: elementary/actions/release@main
1515
env:
1616
GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}"
1717
GIT_USER_NAME: "elementaryBot"

daemon-gtk3/BackgroundMenu.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*/
55

66
public class Gala.Daemon.BackgroundMenu : Gtk.Menu {
7-
public const string ACTION_GROUP_PREFIX = "background-menu";
8-
public const string ACTION_PREFIX = ACTION_GROUP_PREFIX + ".";
7+
private const string ACTION_GROUP_PREFIX = "background-menu";
8+
private const string ACTION_PREFIX = ACTION_GROUP_PREFIX + ".";
99

1010
construct {
1111
var change_wallpaper = new Gtk.MenuItem.with_label (_("Change Wallpaper…")) {

daemon/MonitorLabel.vala

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

66
public class Gala.Daemon.MonitorLabel : Gtk.Window {
7-
private const int SPACING = 12;
87
private const string COLORED_STYLE_CSS = """
98
.%s {
109
background-color: alpha(%s, 0.8);

data/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Type=notify
2222
ExecStart=@bindir@/gala
2323

2424
# unset some environment variables that were set by the compositor and won't work now that the compositor is gone
25-
ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY'
25+
ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY && rm -f "$XDG_RUNTIME_DIR/wayland-0" "$XDG_RUNTIME_DIR/wayland-0.lock"'
2626

2727
# On wayland we cannot restart
2828
Restart=no

lib/Gestures/Gesture.vala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ namespace Gala {
3939
SWITCH_WORKSPACE,
4040
SWITCH_WINDOWS,
4141
MULTITASKING_VIEW,
42-
DOCK,
4342
ZOOM,
44-
CLOSE_WINDOW,
43+
CUSTOM,
4544
N_ACTIONS
4645
}
4746

lib/Gestures/GestureController.vala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public class Gala.GestureController : Object {
6060
public double distance { get; construct set; }
6161
public double overshoot_lower_clamp { get; construct set; default = 0d; }
6262
public double overshoot_upper_clamp { get; construct set; default = 1d; }
63+
public bool follow_natural_scroll { get; set; default = false; }
6364

6465
/**
6566
* When disabled gesture progress will stay where the gesture ended and not snap to full integers values.
@@ -166,6 +167,12 @@ public class Gala.GestureController : Object {
166167
direction_multiplier = -1;
167168
}
168169

170+
if (follow_natural_scroll &&
171+
!GestureSettings.is_natural_scroll_enabled (gesture.performed_on_device_type)
172+
) {
173+
direction_multiplier *= -1;
174+
}
175+
169176
if (snap && !Meta.Prefs.get_gnome_animations ()) {
170177
recognizing = false;
171178
prepare ();

lib/Gestures/GestureSettings.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private class Gala.GestureSettings : Object {
2828
touchpad_settings = new GLib.Settings ("org.gnome.desktop.peripherals.touchpad");
2929
}
3030

31-
public bool is_natural_scroll_enabled (Clutter.InputDeviceType device_type) {
31+
public static bool is_natural_scroll_enabled (Clutter.InputDeviceType device_type) {
3232
return (device_type == Clutter.InputDeviceType.TOUCHSCREEN_DEVICE)
3333
? true
3434
: touchpad_settings.get_boolean ("natural-scroll");

lib/Text.vala

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* SPDX-License-Identifier: LGPL-3.0-or-later
3+
* SPDX-FileCopyrightText: 2025 elementary, Inc. (https://elementary.io)
4+
*/
5+
6+
/*
7+
* Clutter.Text that automatically changes font-name to the system one
8+
*/
9+
public class Gala.Text : Clutter.Text {
10+
private static GLib.Settings gnome_interface_settings;
11+
12+
static construct {
13+
gnome_interface_settings = new GLib.Settings ("org.gnome.desktop.interface");
14+
}
15+
16+
construct {
17+
set_system_font_name ();
18+
gnome_interface_settings.changed["font-name"].connect (set_system_font_name);
19+
}
20+
21+
private void set_system_font_name () {
22+
var name = gnome_interface_settings.get_string ("font-name").split (" ");
23+
var last_element_index = name.length - 1;
24+
25+
if (int.try_parse (name[last_element_index])) { // if last element is a font-size
26+
name[last_element_index] = "12"; // hardcode size (can be changed later if needed)
27+
} else {
28+
name += "12";
29+
}
30+
31+
font_name = string.joinv (" ", name);
32+
}
33+
}

0 commit comments

Comments
 (0)