Skip to content

Commit c05648e

Browse files
authored
Merge branch 'main' into lenemter/introduce-property-animator
2 parents e469f21 + 91e65ff commit c05648e

File tree

241 files changed

+16462
-10458
lines changed

Some content is hidden

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

241 files changed

+16462
-10458
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- synchronize
99

1010
jobs:
11-
build:
11+
build-and-test:
1212

1313
runs-on: ubuntu-22.04
1414

@@ -36,9 +36,12 @@ jobs:
3636
env:
3737
DESTDIR: out
3838
run: |
39-
meson build -Ddocumentation=true
39+
meson build -Ddocumentation=true -Dtests=true
4040
ninja -C build
4141
ninja -C build install
42+
- name: Run Tests
43+
run: |
44+
meson test -v -C build
4245
4346
fedora:
4447
runs-on: ubuntu-latest
@@ -93,3 +96,4 @@ jobs:
9396
io.elementary.vala-lint -d lib
9497
io.elementary.vala-lint -d plugins
9598
io.elementary.vala-lint -d src
99+
io.elementary.vala-lint -d tests

daemon-gtk3/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ executable(
1515
gala_daemon_sources,
1616
gala_common_enums,
1717
config_header,
18+
gala_resources,
1819
dependencies: [granite6_dep, hdy_dep],
1920
install: true,
2021
)

data/gala.metainfo.xml.in

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,41 @@
2727
<update_contact>contact_at_elementary.io</update_contact>
2828

2929
<releases>
30+
<release version="8.3.0" date="2025-11-05" urgency="medium">
31+
<description>
32+
<p>Improvements:</p>
33+
<ul>
34+
<li>Updated translations</li>
35+
<li>Improved HiDPI support</li>
36+
<li>Improved render performance</li>
37+
<li>Reveal dock and panel in sync when starting</li>
38+
<li>Improved workspace switch dock animation</li>
39+
<li>Picture-in-Picture windows now have rounded corners</li>
40+
</ul>
41+
</description>
42+
<issues>
43+
<issue url="https://github.com/elementary/gala/issues/335">Close button isn't always on top</issue>
44+
<issue url="https://github.com/elementary/gala/issues/501">Tiled and maximized widows show different behaviour on wingpanel when in front of fullscreen windows</issue>
45+
<issue url="https://github.com/elementary/gala/issues/1385">Urgent notifications can get offset</issue>
46+
<issue url="https://github.com/elementary/gala/issues/1998">Blur Behind</issue>
47+
<issue url="https://github.com/elementary/gala/issues/2057">Trying to change desktop bg to a color don´t work</issue>
48+
<issue url="https://github.com/elementary/gala/issues/2071">Dock overlapping right-click menu on elementary OS 8</issue>
49+
<issue url="https://github.com/elementary/gala/issues/2079">Gala app icon shows up in Dock briefly</issue>
50+
<issue url="https://github.com/elementary/gala/issues/2333">Wingpanel crashes than reappears in the middle of the screen</issue>
51+
<issue url="https://github.com/elementary/gala/issues/2399">Horizontal swipe to switch workspace no longer follows natural scrolling setting</issue>
52+
<issue url="https://github.com/elementary/gala/issues/2444">Multitasking view - wrong animation with multiple monitors</issue>
53+
<issue url="https://github.com/elementary/gala/issues/2445">Multitasking view - window preview sometimes disappears</issue>
54+
<issue url="https://github.com/elementary/gala/issues/2451">Windows get burned onto the screen when "Reduce Motion" is on in Secure Session</issue>
55+
<issue url="https://github.com/elementary/gala/issues/2454">Right-click menu in wrong location with 2x DPI setting</issue>
56+
<issue url="https://github.com/elementary/gala/issues/2489">Flatpaks don't open upon switching from Secure to Classic: DISPLAY not set</issue>
57+
<issue url="https://github.com/elementary/gala/issues/2507">Logs filled with assertion fails / failure messages</issue>
58+
<issue url="https://github.com/elementary/gala/issues/2515">Main window is being resized to dialog/child window size after reopen</issue>
59+
<issue url="https://github.com/elementary/gala/issues/2530">Freezing minimized windows</issue>
60+
<issue url="https://github.com/elementary/dock/issues/479">Dock is shown over fullscreen apps</issue>
61+
<issue url="https://github.com/elementary/wingpanel/issues/639">Wingpanel starts at middle of the screen</issue>
62+
</issues>
63+
</release>
64+
3065
<release version="8.2.5" date="2025-07-09" urgency="medium">
3166
<description>
3267
<p>Improvements:</p>

lib/CloseButton.vala

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@ public class Gala.CloseButton : Clutter.Actor {
88
private static Gee.HashMap<int, Gdk.Pixbuf?> close_pixbufs;
99

1010
public signal void triggered (uint32 timestamp);
11-
public float scale { get; construct set; }
11+
12+
public float monitor_scale { get; construct set; }
1213

1314
// used to avoid changing hitbox of the button
1415
private Clutter.Actor pixbuf_actor;
1516
private bool is_pressed = false;
1617

17-
public CloseButton (float scale) {
18-
Object (scale: scale);
19-
}
20-
2118
static construct {
2219
close_pixbufs = new Gee.HashMap<int, Gdk.Pixbuf?> ();
2320
}
2421

22+
public CloseButton (float monitor_scale) {
23+
Object (monitor_scale: monitor_scale);
24+
}
25+
2526
construct {
2627
reactive = true;
2728

@@ -30,23 +31,24 @@ public class Gala.CloseButton : Clutter.Actor {
3031
};
3132
add_child (pixbuf_actor);
3233

33-
var pixbuf = get_close_button_pixbuf (scale);
34+
load_pixbuf ();
35+
notify["monitor-scale"].connect (load_pixbuf);
36+
}
37+
38+
private void load_pixbuf () {
39+
var pixbuf = get_close_button_pixbuf (monitor_scale);
3440
if (pixbuf != null) {
35-
try {
36-
var image = new Gala.Image.from_pixbuf (pixbuf);
37-
pixbuf_actor.set_content (image);
38-
pixbuf_actor.set_size (pixbuf.width, pixbuf.height);
39-
set_size (pixbuf.width, pixbuf.height);
40-
} catch (Error e) {
41-
create_error_texture ();
42-
}
41+
var image = new Gala.Image.from_pixbuf (pixbuf);
42+
pixbuf_actor.set_content (image);
43+
pixbuf_actor.set_size (pixbuf.width, pixbuf.height);
44+
set_size (pixbuf.width, pixbuf.height);
4345
} else {
4446
create_error_texture ();
4547
}
4648
}
4749

48-
private static Gdk.Pixbuf? get_close_button_pixbuf (float scale) {
49-
var height = Utils.scale_to_int (36, scale);
50+
private static Gdk.Pixbuf? get_close_button_pixbuf (float monitor_scale) {
51+
var height = Utils.calculate_button_size (monitor_scale);
5052

5153
if (close_pixbufs[height] == null) {
5254
try {
@@ -71,13 +73,13 @@ public class Gala.CloseButton : Clutter.Actor {
7173
// works as good as some weird fallback-image-failed-to-load pixbuf
7274
critical ("Could not create close button");
7375

74-
var size = Utils.scale_to_int (36, scale);
76+
var size = Utils.calculate_button_size (monitor_scale);
7577
pixbuf_actor.set_size (size, size);
7678
pixbuf_actor.background_color = { 255, 0, 0, 255 };
7779
}
7880

7981
public override bool button_press_event (Clutter.Event e) {
80-
var estimated_duration = (uint) (ANIMATION_DURATION * (scale_x - 0.8) / 0.2);
82+
var estimated_duration = Utils.get_animation_duration ((uint) (ANIMATION_DURATION * (scale_x - 0.8) / 0.2));
8183

8284
pixbuf_actor.save_easing_state ();
8385
pixbuf_actor.set_easing_duration (estimated_duration);
@@ -109,7 +111,7 @@ public class Gala.CloseButton : Clutter.Actor {
109111
}
110112

111113
private void reset_scale () {
112-
var estimated_duration = (uint) (ANIMATION_DURATION * (1.0 - scale_x) / 0.2);
114+
var estimated_duration = Utils.get_animation_duration ((uint) (ANIMATION_DURATION * (1.0 - scale_x) / 0.2));
113115

114116
pixbuf_actor.save_easing_state ();
115117
pixbuf_actor.set_easing_duration (estimated_duration);

lib/Drawing/Color.vala

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,25 @@ namespace Gala.Drawing {
99
* A class containing an RGBA color and methods for more powerful color manipulation.
1010
*/
1111
public class Color : GLib.Object {
12-
public const Gdk.RGBA LIGHT_BACKGROUND = { (250f / 255f), (250f / 255f), (250f / 255f), 1};
13-
public const Gdk.RGBA DARK_BACKGROUND = { (51 / 255f), (51 / 255f), (51 / 255f), 1};
14-
public const Gdk.RGBA LIGHT_BORDER = { 0, 0, 0, 0.2f};
15-
public const Gdk.RGBA DARK_BORDER = { 0, 0, 0, 0.75f};
16-
public const Gdk.RGBA LIGHT_HIGHLIGHT = { 255, 255, 255, 1};
17-
public const Gdk.RGBA DARK_HIGHLIGHT = { 255, 255, 255, 0.05f};
18-
public const Gdk.RGBA TOOLTIP_BACKGROUND = { 0, 0, 0, 1};
19-
public const Gdk.RGBA TOOLTIP_TEXT_COLOR = { 1, 1, 1, 1};
12+
#if !HAS_MUTTER47
13+
public const Clutter.Color LIGHT_BACKGROUND = { 250, 250, 250, 255};
14+
public const Clutter.Color DARK_BACKGROUND = { 51, 51, 51, 255};
15+
public const Clutter.Color LIGHT_BORDER = { 0, 0, 0, 51};
16+
public const Clutter.Color DARK_BORDER = { 0, 0, 0, 191};
17+
public const Clutter.Color LIGHT_HIGHLIGHT = { 255, 255, 255, 255};
18+
public const Clutter.Color DARK_HIGHLIGHT = { 255, 255, 255, 13};
19+
public const Clutter.Color TOOLTIP_BACKGROUND = { 0, 0, 0, 255};
20+
public const Clutter.Color TOOLTIP_TEXT_COLOR = { 255, 255, 255, 255};
21+
#else
22+
public const Cogl.Color LIGHT_BACKGROUND = { 250, 250, 250, 255};
23+
public const Cogl.Color DARK_BACKGROUND = { 51, 51, 51, 255};
24+
public const Cogl.Color LIGHT_BORDER = { 0, 0, 0, 51};
25+
public const Cogl.Color DARK_BORDER = { 0, 0, 0, 191};
26+
public const Cogl.Color LIGHT_HIGHLIGHT = { 255, 255, 255, 255};
27+
public const Cogl.Color DARK_HIGHLIGHT = { 255, 255, 255, 13};
28+
public const Cogl.Color TOOLTIP_BACKGROUND = { 0, 0, 0, 255};
29+
public const Cogl.Color TOOLTIP_TEXT_COLOR = { 255, 255, 255, 255};
30+
#endif
2031

2132
/**
2233
* The value of the red channel, with 0 being the lowest value and 1.0 being the greatest value.
@@ -93,15 +104,6 @@ namespace Gala.Drawing {
93104
this.A = A;
94105
}
95106

96-
/**
97-
* Constructs a new {@link Gala.Drawing.Color} from a {@link Gdk.RGBA}.
98-
*
99-
* @param color the {@link Gdk.RGBA}
100-
*/
101-
public Color.from_rgba (Gdk.RGBA color) {
102-
set_from_rgba (color);
103-
}
104-
105107
/**
106108
* Constructs a new {@link Gala.Drawing.Color} from a string.
107109
*
@@ -112,14 +114,20 @@ namespace Gala.Drawing {
112114
* * A RGB color in the form “rgb(r,g,b)” (In this case the color will have full opacity)
113115
* * A RGBA color in the form “rgba(r,g,b,a)”
114116
*
115-
* For more details on formatting and how this function works see {@link Gdk.RGBA.parse}
117+
* For more details on formatting and how this function works see {@link Clutter.Color.from_string}
116118
*
117119
* @param color the string specifying the color
118120
*/
119121
public Color.from_string (string color) {
120-
Gdk.RGBA rgba = Gdk.RGBA ();
121-
rgba.parse (color);
122-
set_from_rgba (rgba);
122+
#if !HAS_MUTTER47
123+
var parsed_color = Clutter.Color.from_string (color);
124+
#else
125+
var parsed_color = Cogl.Color.from_string (color);
126+
#endif
127+
R = parsed_color.red / 255.0;
128+
G = parsed_color.green / 255.0;
129+
B = parsed_color.blue / 255.0;
130+
A = parsed_color.alpha / 255.0;
123131
}
124132

125133
/**
@@ -508,13 +516,17 @@ namespace Gala.Drawing {
508516
* Note: that this string representation may lose some precision, since r, g and b are represented
509517
* as 8-bit integers. If this is a concern, you should use a different representation.
510518
*
511-
* This returns the same string as a {@link Gdk.RGBA} would return in {@link Gdk.RGBA.to_string}
519+
* This returns the same string as a {@link Clutter.Color} would return in {@link Clutter.Color.to_string}
512520
*
513521
* @return the text string
514522
*/
515523
public string to_string () {
516-
Gdk.RGBA rgba = {(float)R, (float)G, (float)B, (float)A};
517-
return rgba.to_string ();
524+
#if !HAS_MUTTER47
525+
Clutter.Color color = { (uint8) (R * 255), (uint8) (G * 255), (uint8) (B * 255), (uint8) (A * 255) };
526+
#else
527+
Cogl.Color color = { (uint8) (R * 255), (uint8) (G * 255), (uint8) (B * 255), (uint8) (A * 255) };
528+
#endif
529+
return color.to_string ();
518530
}
519531

520532
/**
@@ -546,12 +558,5 @@ namespace Gala.Drawing {
546558

547559
return (alpha << 24) | (red << 16) | (green << 8) | blue;
548560
}
549-
550-
private void set_from_rgba (Gdk.RGBA color) {
551-
R = color.red;
552-
G = color.green;
553-
B = color.blue;
554-
A = color.alpha;
555-
}
556561
}
557562
}

lib/Drawing/StyleManager.vala

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,19 @@ public class Gala.Drawing.StyleManager : Object {
3030

3131
private const string FDO_ACCOUNTS_NAME = "org.freedesktop.Accounts";
3232
private const string FDO_ACCOUNTS_PATH = "/org/freedesktop/Accounts";
33-
34-
private const float ACCENT_COLOR_ALPHA = 0.25f;
35-
private const Gdk.RGBA DEFAULT_ACCENT_COLOR = { 0, 0, 0, ACCENT_COLOR_ALPHA };
33+
private const uint8 ACCENT_COLOR_ALPHA = 64;
3634

3735
private static GLib.Once<StyleManager> instance;
38-
public static StyleManager get_instance () {
36+
public static unowned StyleManager get_instance () {
3937
return instance.once (() => new StyleManager ());
4038
}
4139

4240
public ColorScheme prefers_color_scheme { get; private set; default = LIGHT; }
43-
public Gdk.RGBA theme_accent_color { get; private set; default = DEFAULT_ACCENT_COLOR; }
41+
#if !HAS_MUTTER47
42+
public Clutter.Color theme_accent_color { get; private set; default = { 0, 0, 0, ACCENT_COLOR_ALPHA }; }
43+
#else
44+
public Cogl.Color theme_accent_color { get; private set; default = { 0, 0, 0, ACCENT_COLOR_ALPHA }; }
45+
#endif
4446

4547
private PantheonAccountsService? pantheon_proxy;
4648
private SettingsDaemonAccountsService? settings_daemon_proxy;
@@ -94,16 +96,11 @@ public class Gala.Drawing.StyleManager : Object {
9496
private void update_color (int color) {
9597
var rgb = get_color (color);
9698

97-
var r = ((rgb >> 16) & 255) / 255.0f;
98-
var g = ((rgb >> 8) & 255) / 255.0f;
99-
var b = (rgb & 255) / 255.0f;
99+
var r = (uint8) ((rgb >> 16) & 255);
100+
var g = (uint8) ((rgb >> 8) & 255);
101+
var b = (uint8) (rgb & 255);
100102

101-
theme_accent_color = {
102-
r,
103-
g,
104-
b,
105-
ACCENT_COLOR_ALPHA
106-
};
103+
theme_accent_color = { r, g, b, ACCENT_COLOR_ALPHA };
107104
}
108105

109106
private int get_color (int color) {

lib/Gestures/GestureController.vala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public class Gala.GestureController : Object {
6464

6565
/**
6666
* When disabled gesture progress will stay where the gesture ended and not snap to full integers values.
67-
* This will also cause the controller to emit smooth progress information even if animations are disabled.
6867
*/
6968
public bool snap { get; construct set; default = true; }
7069

@@ -173,12 +172,6 @@ public class Gala.GestureController : Object {
173172
direction_multiplier *= -1;
174173
}
175174

176-
if (snap && !Meta.Prefs.get_gnome_animations ()) {
177-
recognizing = false;
178-
prepare ();
179-
finish (0, progress + direction_multiplier);
180-
}
181-
182175
recognizing_backend = backend;
183176
}
184177

lib/Utils.vala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
namespace Gala {
1919
public class Utils {
20+
private const int BUTTON_SIZE = 36;
21+
2022
private struct CachedIcon {
2123
public Gdk.Pixbuf icon;
2224
public int icon_size;
@@ -365,7 +367,7 @@ namespace Gala {
365367
* @return the resize button pixbuf or null if it failed to load
366368
*/
367369
public static Gdk.Pixbuf? get_resize_button_pixbuf (float scale) {
368-
var height = scale_to_int (36, scale);
370+
var height = calculate_button_size (scale);
369371

370372
if (resize_pixbufs == null) {
371373
resize_pixbufs = new Gee.HashMap<int, Gdk.Pixbuf?> ();
@@ -407,7 +409,7 @@ namespace Gala {
407409
// we'll just make this red so there's at least something as an
408410
// indicator that loading failed. Should never happen and this
409411
// works as good as some weird fallback-image-failed-to-load pixbuf
410-
var size = scale_to_int (36, scale);
412+
var size = calculate_button_size (scale);
411413
texture.set_size (size, size);
412414
texture.background_color = { 255, 0, 0, 255 };
413415
}
@@ -480,5 +482,9 @@ namespace Gala {
480482
return false;
481483
}
482484
}
485+
486+
public static int calculate_button_size (float monitor_scale) {
487+
return Utils.scale_to_int (BUTTON_SIZE, monitor_scale);
488+
}
483489
}
484490
}

0 commit comments

Comments
 (0)