Skip to content

Commit 2755d30

Browse files
authored
Merge branch 'main' into leolost/gesture-action
2 parents bab68d4 + 56d8caf commit 2755d30

File tree

10 files changed

+285
-326
lines changed

10 files changed

+285
-326
lines changed

data/gala.metainfo.xml.in

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

2929
<releases>
30-
<release version="8.0.5" date="2024-12-18" urgency="medium">
30+
<release version="8.1.0" date="2025-01-11" urgency="medium">
3131
<description>
3232
<p>Improvements:</p>
3333
<ul>
@@ -39,14 +39,22 @@
3939
</description>
4040
<issues>
4141
<issue url="https://github.com/elementary/gala/issues/397">Prevent PIP overlapping wingpanel?</issue>
42+
<issue url="https://github.com/elementary/gala/issues/551">Return to original workspace if a fullscreen window is closed and there is no more windows open</issue>
43+
<issue url="https://github.com/elementary/gala/issues/815">Zoom with Super + Scroll</issue>
4244
<issue url="https://github.com/elementary/gala/issues/857">Toggling the active window's maximization state during multitasking view messes up the window preview size</issue>
45+
<issue url="https://github.com/elementary/gala/issues/1178">Workspace Switching with Keyboard (meta) + Mouse scroll</issue>
4346
<issue url="https://github.com/elementary/gala/issues/1967">Some apps ignore HiDPI mode</issue>
47+
<issue url="https://github.com/elementary/gala/issues/1986">Does not return to the first virtual desktop after exiting fullscreen mode.</issue>
4448
<issue url="https://github.com/elementary/gala/issues/2088">Invisible window clones</issue>
49+
<issue url="https://github.com/elementary/gala/issues/2102">Notifications sometimes result in segfault</issue>
4550
<issue url="https://github.com/elementary/gala/issues/2113">gnome-session-x11-services-ready.target isn't started on Wayland session</issue>
4651
<issue url="https://github.com/elementary/gala/issues/2131">Unthemed cursor style and glitchy menus on some applications</issue>
52+
<issue url="https://github.com/elementary/gala/issues/2154">Windows do not display correctly after moving between workspaces</issue>
4753
<issue url="https://github.com/elementary/gala/issues/2159">Crash when moving windows between workspaces and using gestures to switch</issue>
4854
<issue url="https://github.com/elementary/gala/issues/2169">Text UI based Scaling: Tiny Titlebars in XWayland Apps</issue>
55+
<issue url="https://github.com/elementary/gala/issues/2170">Don’t show app icons in app window spread</issue>
4956
<issue url="https://github.com/elementary/gala/issues/2171">PiP dragging doesn't start until after mouse is released</issue>
57+
<issue url="https://github.com/elementary/gala/issues/2175">Gala crashes when receiving a notification while switching workspaces</issue>
5058
</issues>
5159
</release>
5260

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('gala',
22
'c', 'vala',
3-
version: '8.0.4',
3+
version: '8.1.0',
44
meson_version: '>= 0.59.0',
55
license: 'GPL3',
66
)

src/Gestures/GesturePropertyTransition.vala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ public class Gala.GesturePropertyTransition : Object {
8484
* to the final position. If with_gesture is false it will just ease to the {@link to_value}.
8585
* #this will keep itself alive until the animation finishes so it is safe to immediatly unref it after creation and calling start.
8686
*
87-
* @param done_callback a callback for when the transition finishes. It is guaranteed to be called exactly once.
87+
* @param done_callback a callback for when the transition finishes. This shouldn't be used for setting state, instead state should
88+
* be set immediately on {@link GestureTracker.OnEnd} not only once the animation ends to allow for interrupting the animation by starting a new gesture.
89+
* done_callback will only be called if the animation finishes, not if it is interrupted e.g. by starting a new animation for the same property,
90+
* destroying the actor or removing the transition.
8891
*/
8992
public void start (bool with_gesture, owned DoneCallback? done_callback = null) {
9093
ref ();
@@ -179,8 +182,8 @@ public class Gala.GesturePropertyTransition : Object {
179182
}
180183
}
181184

182-
private void finish () {
183-
if (done_callback != null) {
185+
private void finish (bool callback = true) {
186+
if (done_callback != null && callback) {
184187
done_callback ();
185188
}
186189

src/HotCorners/HotCornerManager.vala

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,16 @@ public class Gala.HotCornerManager : Object {
9292
private void run_custom_action (string hot_corner_position) {
9393
string command = "";
9494
var line = behavior_settings.get_string ("hotcorner-custom-command");
95-
if (line == "")
95+
if (line == "") {
9696
return;
97+
}
9798

9899
var parts = line.split (";;");
99-
// keep compatibility to old version where only one command was possible
100-
if (parts.length == 1) {
101-
command = line;
102-
} else {
103-
// find specific actions
104-
foreach (unowned var part in parts) {
105-
var details = part.split (":");
106-
if (details[0] == hot_corner_position) {
107-
command = details[1];
108-
}
100+
// find specific actions
101+
foreach (unowned var part in parts) {
102+
var details = part.split (":", 2);
103+
if (details[0] == hot_corner_position) {
104+
command = details[1];
109105
}
110106
}
111107

src/InternalUtils.vala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,5 +369,16 @@ namespace Gala {
369369
}
370370
});
371371
}
372+
373+
public static void clutter_actor_reparent (Clutter.Actor actor, Clutter.Actor new_parent) {
374+
if (actor == new_parent) {
375+
return;
376+
}
377+
378+
actor.ref ();
379+
actor.get_parent ().remove_child (actor);
380+
new_parent.add_child (actor);
381+
actor.unref ();
382+
}
372383
}
373384
}

src/ScreenshotManager.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ namespace Gala {
155155
var rect = window.get_frame_rect ();
156156
#if HAS_MUTTER45
157157
if (!include_frame) {
158-
#if else
158+
#else
159159
if ((include_frame && window.is_client_decorated ()) ||
160160
(!include_frame && !window.is_client_decorated ())) {
161161
#endif

src/ShellClients/PanelWindow.vala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ public class Gala.PanelWindow : Object {
3636

3737
unowned var display = wm.get_display ();
3838

39+
window_positioner = new WindowPositioner (display, window, WindowPositioner.Position.from_anchor (anchor));
40+
41+
notify["anchor"].connect (() => window_positioner.position = WindowPositioner.Position.from_anchor (anchor));
42+
3943
unowned var workspace_manager = display.get_workspace_manager ();
4044
workspace_manager.workspace_added.connect (update_strut);
4145
workspace_manager.workspace_removed.connect (update_strut);
4246

4347
window.size_changed.connect (update_strut);
4448
window.position_changed.connect (update_strut);
45-
46-
window_positioner = new WindowPositioner (display, window, WindowPositioner.Position.from_anchor (anchor));
47-
48-
notify["anchor"].connect (() => window_positioner.position = WindowPositioner.Position.from_anchor (anchor));
4949
}
5050

5151
#if HAS_MUTTER45

src/Widgets/WindowClone.vala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ public class Gala.WindowClone : Clutter.Actor {
266266
update_hover_widgets (false);
267267
toggle_shadow (false);
268268
});
269+
270+
if (should_fade ()) {
271+
new GesturePropertyTransition (this, gesture_tracker, "opacity", null, 0u).start (with_gesture);
272+
}
269273
}
270274

271275
/**
@@ -294,6 +298,7 @@ public class Gala.WindowClone : Clutter.Actor {
294298
new GesturePropertyTransition (this, gesture_tracker, "y", intial_y, (float) rect.y).start (with_gesture);
295299
new GesturePropertyTransition (this, gesture_tracker, "width", (float) initial_width, (float) rect.width).start (with_gesture);
296300
new GesturePropertyTransition (this, gesture_tracker, "height", (float) initial_height, (float) rect.height).start (with_gesture);
301+
new GesturePropertyTransition (this, gesture_tracker, "opacity", null, 255u).start (with_gesture);
297302
new GesturePropertyTransition (this, gesture_tracker, "shadow-opacity", (uint8) 0, (uint8) 255).start (with_gesture);
298303
new GesturePropertyTransition (window_icon, gesture_tracker, "opacity", 0u, 255u).start (with_gesture, () => {
299304
update_hover_widgets (false);

0 commit comments

Comments
 (0)