Skip to content

Commit 6adc012

Browse files
authored
Merge branch 'main' into lenemter/fix-active-shape
2 parents fafd7d7 + d23fdb8 commit 6adc012

File tree

226 files changed

+15195
-10278
lines changed

Some content is hidden

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

226 files changed

+15195
-10278
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

data/gala.metainfo.xml.in

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

2929
<releases>
30+
<release version="8.3.0" date="2025-10-28" 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/501">Tiled and maximized widows show different behaviour on wingpanel when in front of fullscreen windows</issue>
44+
<issue url="https://github.com/elementary/gala/issues/1385">Urgent notifications can get offset</issue>
45+
<issue url="https://github.com/elementary/gala/issues/1998">Blur Behind</issue>
46+
<issue url="https://github.com/elementary/gala/issues/2057">Trying to change desktop bg to a color don´t work</issue>
47+
<issue url="https://github.com/elementary/gala/issues/2079">Gala app icon shows up in Dock briefly</issue>
48+
<issue url="https://github.com/elementary/gala/issues/2333">Wingpanel crashes than reappears in the middle of the screen</issue>
49+
<issue url="https://github.com/elementary/gala/issues/2399">Horizontal swipe to switch workspace no longer follows natural scrolling setting</issue>
50+
<issue url="https://github.com/elementary/gala/issues/2444">Multitasking view - wrong animation with multiple monitors</issue>
51+
<issue url="https://github.com/elementary/gala/issues/2445">Multitasking view - window preview sometimes disappears</issue>
52+
<issue url="https://github.com/elementary/gala/issues/2451">Windows get burned onto the screen when "Reduce Motion" is on in Secure Session</issue>
53+
<issue url="https://github.com/elementary/gala/issues/2454">Right-click menu in wrong location with 2x DPI setting</issue>
54+
<issue url="https://github.com/elementary/gala/issues/2489">Flatpaks don't open upon switching from Secure to Classic: DISPLAY not set</issue>
55+
<issue url="https://github.com/elementary/gala/issues/2507">Logs filled with assertion fails / failure messages</issue>
56+
<issue url="https://github.com/elementary/gala/issues/2515">Main window is being resized to dialog/child window size after reopen</issue>
57+
<issue url="https://github.com/elementary/gala/issues/2530">Freezing minimized windows</issue>
58+
<issue url="https://github.com/elementary/dock/discussions/478">Dock is shown over fullscreen apps</issue>
59+
<issue url="https://github.com/elementary/wingpanel/issues/639">Wingpanel starts at middle of the screen</issue>
60+
</issues>
61+
</release>
62+
3063
<release version="8.2.5" date="2025-07-09" urgency="medium">
3164
<description>
3265
<p>Improvements:</p>

lib/CloseButton.vala

Lines changed: 19 additions & 17 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,7 +73,7 @@ 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
}

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/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
}

meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ subdir('plugins/template')
176176
if get_option('documentation')
177177
subdir('docs')
178178
endif
179+
if get_option('tests')
180+
subdir('tests')
181+
endif
179182
subdir('po')
180183

181184
vapigen = find_program('vapigen', required: false)

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
option ('documentation', type : 'boolean', value : false)
2+
option ('tests', type : 'boolean', value : false)
23
option ('systemd', type : 'boolean', value : true)
34
option ('systemduserunitdir', type : 'string', value : '')
45
option ('old-icon-groups', type : 'boolean', value : false)

plugins/pip/PopupWindow.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
5252
construct {
5353
var scale = display.get_monitor_scale (display.get_current_monitor ());
5454

55-
button_size = Gala.Utils.scale_to_int (36, scale);
55+
button_size = Gala.Utils.calculate_button_size (scale);
5656
container_margin = button_size / 2;
5757

5858
reactive = true;

0 commit comments

Comments
 (0)