Skip to content

Commit 920b8a3

Browse files
authored
Merge branch 'main' into leolost/shadow-effect-delay-cache-drop
2 parents e2a38c8 + b9dd5cc commit 920b8a3

Some content is hidden

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

66 files changed

+1962
-1204
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

data/gala.metainfo.xml.in

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,30 @@
2727
<update_contact>contact_at_elementary.io</update_contact>
2828

2929
<releases>
30-
<release version="8.0.2" date="2024-10-15" urgency="medium">
30+
<release version="8.0.3" date="2024-11-20" urgency="medium">
3131
<description>
3232
<p>Improvements:</p>
3333
<ul>
3434
<li>Updated translations</li>
3535
</ul>
3636
</description>
3737
<issues>
38+
<issue url="https://github.com/elementary/dock/issues/300">Slight timeout before hiding dock again</issue>
39+
<issue url="https://github.com/elementary/dock/issues/309">Dock doesn't disappear with two tiled maximised windows</issue>
40+
<issue url="https://github.com/elementary/gala/issues/1960">Multitasking view doesn't respond to touchscreen events</issue>
41+
<issue url="https://github.com/elementary/gala/issues/2064">Multitasking view on wayland gets stuck grabbing window</issue>
42+
</issues>
43+
</release>
44+
45+
<release version="8.0.2" date="2024-10-24" urgency="medium">
46+
<description>
47+
<p>Improvements:</p>
48+
<ul>
49+
<li>Updated translations</li>
50+
</ul>
51+
</description>
52+
<issues>
53+
<issue url="https://github.com/elementary/gala/issues/1737">Cursor only visible in window screenshots</issue>
3854
<issue url="https://github.com/elementary/gala/issues/1898">wayland: opening windows when overview is opened breaks a lot</issue>
3955
<issue url="https://github.com/elementary/gala/issues/2053">Window renders black</issue>
4056
<issue url="https://github.com/elementary/gala/issues/2067">Terminal and System Settings have generic icon in multitasking view on Wayland</issue>

lib/AnimationsSettings.vala

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* SPDX-License-Identifier: GPL-3.0-or-later
3+
* SPDX-FileCopyrightText: 2024 elementary, Inc. (https://elementary.io)
4+
*/
5+
6+
namespace AnimationsSettings {
7+
private GLib.Settings? animations_settings;
8+
private bool enable_animations = true;
9+
10+
/**
11+
* Whether animations should be displayed.
12+
*/
13+
public bool get_enable_animations () {
14+
if (animations_settings == null) {
15+
animations_settings = new GLib.Settings ("io.elementary.desktop.wm.animations");
16+
animations_settings.changed["enable-animations"].connect (() => {
17+
enable_animations = animations_settings.get_boolean ("enable-animations");
18+
});
19+
20+
enable_animations = animations_settings.get_boolean ("enable-animations");
21+
}
22+
23+
return enable_animations;
24+
}
25+
26+
/**
27+
* Utility that returns the given duration or 0 if animations are disabled.
28+
*/
29+
public uint get_animation_duration (uint duration) {
30+
return get_enable_animations () ? duration : 0;
31+
}
32+
}

lib/App.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ public class Gala.App : GLib.Object {
158158
return windows.data;
159159
}
160160

161-
public GLib.SList<Posix.pid_t?> get_pids () {
162-
var results = new GLib.SList<Posix.pid_t?> ();
161+
public GLib.SList<pid_t?> get_pids () {
162+
var results = new GLib.SList<pid_t?> ();
163163
foreach (unowned var window in windows) {
164164
var pid = window.get_pid ();
165165
if (pid < 1) {

lib/DragDropAction.vala

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -216,40 +216,6 @@ namespace Gala {
216216

217217
return Clutter.EVENT_STOP;
218218

219-
case EventType.BUTTON_RELEASE:
220-
case EventType.TOUCH_END:
221-
if (!is_valid_touch_event (event)) {
222-
return Clutter.EVENT_PROPAGATE;
223-
}
224-
225-
if (!dragging) {
226-
float x, y, ex, ey;
227-
event.get_coords (out ex, out ey);
228-
actor.get_transformed_position (out x, out y);
229-
230-
// release has happened within bounds of actor
231-
if (clicked && x < ex && x + actor.width > ex && y < ey && y + actor.height > ey) {
232-
actor_clicked (event.get_button ());
233-
}
234-
235-
if (clicked) {
236-
ungrab_actor ();
237-
clicked = false;
238-
}
239-
240-
return Clutter.EVENT_STOP;
241-
} else if (dragging) {
242-
if (hovered != null) {
243-
finish ();
244-
hovered = null;
245-
} else {
246-
cancel ();
247-
}
248-
249-
return Clutter.EVENT_STOP;
250-
}
251-
break;
252-
253219
default:
254220
break;
255221
}
@@ -298,7 +264,42 @@ namespace Gala {
298264
if (event.get_key_symbol () == Key.Escape) {
299265
cancel ();
300266
}
301-
break;
267+
268+
return Clutter.EVENT_STOP;
269+
270+
case EventType.BUTTON_RELEASE:
271+
case EventType.TOUCH_END:
272+
if (!is_valid_touch_event (event)) {
273+
return Clutter.EVENT_PROPAGATE;
274+
}
275+
276+
if (dragging) {
277+
if (hovered != null) {
278+
finish ();
279+
hovered = null;
280+
} else {
281+
cancel ();
282+
}
283+
284+
return Clutter.EVENT_STOP;
285+
}
286+
287+
float x, y, ex, ey;
288+
event.get_coords (out ex, out ey);
289+
actor.get_transformed_position (out x, out y);
290+
291+
// release has happened within bounds of actor
292+
if (clicked && x < ex && x + actor.width > ex && y < ey && y + actor.height > ey) {
293+
actor_clicked (event.get_type () == BUTTON_RELEASE ? event.get_button () : Clutter.Button.PRIMARY);
294+
}
295+
296+
if (clicked) {
297+
ungrab_actor ();
298+
clicked = false;
299+
}
300+
301+
return Clutter.EVENT_STOP;
302+
302303
case EventType.MOTION:
303304
case EventType.TOUCH_UPDATE:
304305
if (!is_valid_touch_event (event)) {
@@ -338,6 +339,7 @@ namespace Gala {
338339
}
339340
}
340341
return Clutter.EVENT_STOP;
342+
341343
} else if (dragging) {
342344
handle.x -= last_x - x;
343345
handle.y -= last_y - y;
@@ -468,11 +470,11 @@ namespace Gala {
468470
var type = event.get_type ();
469471

470472
return (
473+
Meta.Util.is_wayland_compositor () ||
471474
type != Clutter.EventType.TOUCH_BEGIN &&
472475
type != Clutter.EventType.TOUCH_CANCEL &&
473476
type != Clutter.EventType.TOUCH_END &&
474-
type != Clutter.EventType.TOUCH_UPDATE ||
475-
Meta.Util.is_wayland_compositor ()
477+
type != Clutter.EventType.TOUCH_UPDATE
476478
);
477479
}
478480
}

lib/WindowManager.vala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ namespace Gala {
123123
*/
124124
public abstract Gala.ActivatableComponent workspace_view { get; protected set; }
125125

126-
/**
127-
* Whether animations should be displayed.
128-
*/
129-
public abstract bool enable_animations { get; protected set; }
130-
131126
/**
132127
* Enters the modal mode, which means that all events are directed to the stage instead
133128
* of the windows. This is the only way to receive keyboard events besides shortcut listeners.

lib/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
gala_lib_sources = files(
22
'ActivatableComponent.vala',
3+
'AnimationsSettings.vala',
34
'App.vala',
45
'AppCache.vala',
56
'AppSystem.vala',

meson.build

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('gala',
22
'c', 'vala',
3-
version: '8.0.1',
3+
version: '8.0.3',
44
meson_version: '>= 0.59.0',
55
license: 'GPL3',
66
)
@@ -158,6 +158,17 @@ if mutter46_dep.found()
158158
vala_flags = ['--define', 'HAS_MUTTER43', '--define', 'HAS_MUTTER44', '--define', 'HAS_MUTTER45', '--define', 'HAS_MUTTER46']
159159
endif
160160

161+
mutter47_dep = dependency('libmutter-15', version: ['>= 47', '< 48'], required: false)
162+
if mutter47_dep.found()
163+
libmutter_dep = dependency('libmutter-15', version: '>= 47')
164+
mutter_dep = [
165+
libmutter_dep,
166+
dependency('mutter-mtk-15'), dependency('mutter-cogl-15'),
167+
dependency('mutter-cogl-pango-15'), dependency('mutter-clutter-15')
168+
]
169+
vala_flags = ['--define', 'HAS_MUTTER43', '--define', 'HAS_MUTTER44', '--define', 'HAS_MUTTER45', '--define', 'HAS_MUTTER46', '--define', 'HAS_MUTTER47']
170+
endif
171+
161172
if mutter_dep.length() == 0
162173
error ('No supported mutter library found!')
163174
endif

plugins/pip/Main.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
9292
var rect = Graphene.Rect.alloc ();
9393
rect.init (point_x, point_y, width, height);
9494

95-
var popup_window = new PopupWindow (wm, active);
95+
var popup_window = new PopupWindow (wm.get_display (), active);
9696
popup_window.set_container_clip (rect);
9797
popup_window.show.connect (on_popup_window_show);
9898
popup_window.hide.connect (on_popup_window_hide);
@@ -114,7 +114,7 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
114114
private void select_window_at (int x, int y) {
115115
var selected = get_window_actor_at (x, y);
116116
if (selected != null) {
117-
var popup_window = new PopupWindow (wm, selected);
117+
var popup_window = new PopupWindow (wm.get_display (), selected);
118118
popup_window.show.connect (on_popup_window_show);
119119
popup_window.hide.connect (on_popup_window_hide);
120120
add_window (popup_window);

0 commit comments

Comments
 (0)