Skip to content

Commit 9617266

Browse files
Merge branch 'main' into lenemter/gala-text
2 parents ad3f52a + ed88ffb commit 9617266

File tree

9 files changed

+92
-55
lines changed

9 files changed

+92
-55
lines changed

data/gala.metainfo.xml.in

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

2929
<releases>
30+
<release version="8.2.4" date="2025-06-12" urgency="medium">
31+
<description>
32+
<p>Improvements:</p>
33+
<ul>
34+
<li>Updated translations</li>
35+
</ul>
36+
</description>
37+
<issues>
38+
<issue url="https://github.com/elementary/gala/issues/2438">Gala randomly segfaults while closing Libreoffice windows</issue>
39+
</issues>
40+
</release>
41+
3042
<release version="8.2.3" date="2025-05-20" urgency="medium">
3143
<description>
3244
<p>Improvements:</p>

lib/Drawing/StyleManager.vala

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ public class Gala.Drawing.StyleManager : Object {
1818
}
1919

2020
[DBus (name="io.elementary.pantheon.AccountsService")]
21-
private interface AccountsService : DBusProxy {
21+
private interface PantheonAccountsService : DBusProxy {
2222
public abstract int prefers_color_scheme { get; set; }
2323
public abstract int prefers_accent_color { get; set; }
2424
}
2525

26+
[DBus (name="io.elementary.SettingsDaemon.AccountsService")]
27+
private interface SettingsDaemonAccountsService : DBusProxy {
28+
public abstract int accent_color { get; set; }
29+
}
30+
2631
private const string FDO_ACCOUNTS_NAME = "org.freedesktop.Accounts";
2732
private const string FDO_ACCOUNTS_PATH = "/org/freedesktop/Accounts";
2833

@@ -37,10 +42,18 @@ public class Gala.Drawing.StyleManager : Object {
3742
public ColorScheme prefers_color_scheme { get; private set; default = LIGHT; }
3843
public Gdk.RGBA theme_accent_color { get; private set; default = DEFAULT_ACCENT_COLOR; }
3944

40-
private AccountsService? accounts_service_proxy;
45+
private PantheonAccountsService? pantheon_proxy;
46+
private SettingsDaemonAccountsService? settings_daemon_proxy;
4147

4248
construct {
43-
Bus.watch_name (SYSTEM, FDO_ACCOUNTS_NAME, NONE, () => connect_to_accounts_service.begin (), () => accounts_service_proxy = null);
49+
Bus.watch_name (
50+
SYSTEM, FDO_ACCOUNTS_NAME, NONE,
51+
() => connect_to_accounts_service.begin (),
52+
() => {
53+
pantheon_proxy = null;
54+
settings_daemon_proxy = null;
55+
}
56+
);
4457
}
4558

4659
private async void connect_to_accounts_service () {
@@ -49,24 +62,27 @@ public class Gala.Drawing.StyleManager : Object {
4962

5063
var path = yield accounts.find_user_by_name (Environment.get_user_name ());
5164

52-
accounts_service_proxy = yield Bus.get_proxy<AccountsService> (SYSTEM, FDO_ACCOUNTS_NAME, path, GET_INVALIDATED_PROPERTIES);
65+
pantheon_proxy = yield Bus.get_proxy<PantheonAccountsService> (SYSTEM, FDO_ACCOUNTS_NAME, path, GET_INVALIDATED_PROPERTIES);
66+
settings_daemon_proxy = yield Bus.get_proxy<SettingsDaemonAccountsService> (SYSTEM, FDO_ACCOUNTS_NAME, path, GET_INVALIDATED_PROPERTIES);
5367
} catch {
5468
warning ("Could not connect to AccountsService. Default accent color will be used");
5569
return;
5670
}
5771

58-
update_color_scheme (accounts_service_proxy.prefers_color_scheme);
59-
update_color (accounts_service_proxy.prefers_accent_color);
72+
update_color_scheme (pantheon_proxy.prefers_color_scheme);
73+
update_color (settings_daemon_proxy.accent_color);
6074

61-
accounts_service_proxy.g_properties_changed.connect ((changed, invalid) => {
62-
var value = changed.lookup_value ("PrefersAccentColor", new VariantType ("i"));
75+
pantheon_proxy.g_properties_changed.connect ((changed, invalid) => {
76+
var value = changed.lookup_value ("PrefersColorScheme", new VariantType ("i"));
6377
if (value != null) {
64-
update_color (value.get_int32 ());
78+
update_color_scheme (value.get_int32 ());
6579
}
80+
});
6681

67-
value = changed.lookup_value ("PrefersColorScheme", new VariantType ("i"));
82+
settings_daemon_proxy.g_properties_changed.connect ((changed, invalid) => {
83+
var value = changed.lookup_value ("AccentColor", new VariantType ("i"));
6884
if (value != null) {
69-
update_color_scheme (value.get_int32 ());
85+
update_color (value.get_int32 ());
7086
}
7187
});
7288
}

po/uk.po

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: beat-box\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2025-06-09 20:49+0000\n"
11-
"PO-Revision-Date: 2025-04-18 01:55+0000\n"
11+
"PO-Revision-Date: 2025-06-11 07:55+0000\n"
1212
"Last-Translator: Ihor Hordiichuk <[email protected]>\n"
1313
"Language-Team: Ukrainian <https://l10n.elementaryos.org/projects/desktop/"
1414
"gala/uk/>\n"
@@ -18,7 +18,7 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
2020
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
21-
"X-Generator: Weblate 5.10.4\n"
21+
"X-Generator: Weblate 5.11.4\n"
2222
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
2323

2424
#: daemon/DBus.vala:84 daemon-gtk3/BackgroundMenu.vala:11
@@ -286,14 +286,13 @@ msgstr "Знімок екрана від %s"
286286
#: src/ScreenshotManager.vala:171
287287
#, c-format
288288
msgid "Open in %s"
289-
msgstr ""
289+
msgstr "Відкрити в %s"
290290

291291
#. / TRANSLATORS: %s represents a name of file manager
292292
#: src/ScreenshotManager.vala:178
293-
#, fuzzy, c-format
294-
#| msgid "Show in Files"
293+
#, c-format
295294
msgid "Show in %s"
296-
msgstr "Показати у Файлах"
295+
msgstr "Показати у %s"
297296

298297
#: src/ScreenshotManager.vala:189 src/ScreenshotManager.vala:548
299298
msgid "Screenshot taken"

src/DesktopIntegration.vala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ public class Gala.DesktopIntegration : GLib.Object {
3737
unowned var display = wm.get_display ();
3838
unowned var workspace_manager = display.get_workspace_manager ();
3939

40-
workspace_manager.active_workspace_changed.connect (() => {
41-
active_workspace_changed ();
42-
windows_changed (); // windows have 'on-active-workspace' property that we need to update
43-
});
40+
workspace_manager.active_workspace_changed.connect (() => active_workspace_changed ());
4441
workspace_manager.workspaces_reordered.connect (() => windows_changed ());
4542
workspace_manager.workspace_added.connect (() => windows_changed ());
4643
workspace_manager.workspace_removed.connect ((index) => {
@@ -99,7 +96,6 @@ public class Gala.DesktopIntegration : GLib.Object {
9996
public Window[] get_windows () throws GLib.DBusError, GLib.IOError {
10097
Window[] returned_windows = {};
10198
var apps = Gala.AppSystem.get_default ().get_running_apps ();
102-
unowned var active_workspace = wm.get_display ().get_workspace_manager ().get_active_workspace ();
10399
foreach (unowned var app in apps) {
104100
foreach (weak Meta.Window window in app.get_windows ()) {
105101
if (!is_eligible_window (window)) {
@@ -116,7 +112,6 @@ public class Gala.DesktopIntegration : GLib.Object {
116112
properties.insert ("client-type", new GLib.Variant.uint32 (window.get_client_type ()));
117113
properties.insert ("is-hidden", new GLib.Variant.boolean (window.is_hidden ()));
118114
properties.insert ("has-focus", new GLib.Variant.boolean (window.has_focus ()));
119-
properties.insert ("on-active-workspace", new GLib.Variant.boolean (window.located_on_workspace (active_workspace)));
120115
properties.insert ("workspace-index", new GLib.Variant.int32 (window.get_workspace ().index ()));
121116
properties.insert ("width", new GLib.Variant.uint32 (frame_rect.width));
122117
properties.insert ("height", new GLib.Variant.uint32 (frame_rect.height));

src/InternalUtils.vala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,5 +350,11 @@ namespace Gala {
350350
Clutter.get_default_backend ().get_default_seat ().bell_notify ();
351351
#endif
352352
}
353+
354+
public static bool get_x11_in_fullscreen (Meta.Display display) {
355+
var primary_monitor = display.get_primary_monitor ();
356+
var is_in_fullscreen = display.get_monitor_in_fullscreen (primary_monitor);
357+
return !Meta.Util.is_wayland_compositor () && is_in_fullscreen;
358+
}
353359
}
354360
}

src/ShellClients/HideTracker.vala

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ public class Gala.HideTracker : Object {
1515

1616
public Meta.Display display { get; construct; }
1717
public unowned PanelWindow panel { get; construct; }
18-
1918
public Pantheon.Desktop.HideMode hide_mode { get; set; }
2019

20+
private static GLib.Settings behavior_settings;
21+
2122
private Clutter.PanAction pan_action;
2223

2324
private bool hovered = false;
2425

2526
private bool overlap = false;
2627
private bool focus_overlap = false;
2728
private bool focus_maximized_overlap = false;
29+
private bool fullscreen_overlap = false;
2830

2931
private Meta.Window current_focus_window;
3032

@@ -37,6 +39,10 @@ public class Gala.HideTracker : Object {
3739
Object (display: display, panel: panel);
3840
}
3941

42+
static construct {
43+
behavior_settings = new GLib.Settings ("io.elementary.desktop.wm.behavior");
44+
}
45+
4046
construct {
4147
panel.window.unmanaging.connect_after (() => {
4248
// The timeouts hold refs on us so we stay connected to signal handlers that might
@@ -145,6 +151,7 @@ public class Gala.HideTracker : Object {
145151
overlap = false;
146152
focus_overlap = false;
147153
focus_maximized_overlap = false;
154+
fullscreen_overlap = display.get_monitor_in_fullscreen (panel.window.get_monitor ());
148155

149156
foreach (var window in display.get_workspace_manager ().get_active_workspace ().list_windows ()) {
150157
if (window == panel.window) {
@@ -195,16 +202,17 @@ public class Gala.HideTracker : Object {
195202
toggle_display (true);
196203
break;
197204

198-
default:
199-
warning ("HideTracker: unsupported hide mode.");
205+
case NEVER:
206+
toggle_display (fullscreen_overlap);
200207
break;
201208
}
202209
}
203210

204211
private void toggle_display (bool should_hide) {
205212
hovered = panel.window.has_pointer ();
206213

207-
if (should_hide && !hovered && !panel.window.has_focus ()) {
214+
// Showing panels in fullscreen is broken in X11
215+
if (should_hide && !hovered && !panel.window.has_focus () || InternalUtils.get_x11_in_fullscreen (display)) {
208216
trigger_hide ();
209217
} else {
210218
trigger_show ();
@@ -331,7 +339,14 @@ public class Gala.HideTracker : Object {
331339
}
332340

333341
private void on_barrier_triggered () {
334-
trigger_show ();
335-
schedule_update ();
342+
// Showing panels in fullscreen is broken in X11
343+
if (InternalUtils.get_x11_in_fullscreen (display)) {
344+
return;
345+
}
346+
347+
if (hide_mode != NEVER || behavior_settings.get_boolean ("enable-hotcorners-in-fullscreen")) {
348+
trigger_show ();
349+
schedule_update ();
350+
}
336351
}
337352
}

src/ShellClients/PanelWindow.vala

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,21 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
1515

1616
public Pantheon.Desktop.HideMode hide_mode {
1717
get {
18-
return hide_tracker == null ? Pantheon.Desktop.HideMode.NEVER : hide_tracker.hide_mode;
18+
return hide_tracker.hide_mode;
1919
}
2020
set {
21+
hide_tracker.hide_mode = value;
22+
2123
if (value == NEVER) {
22-
hide_tracker = null;
23-
show ();
2424
make_exclusive ();
25-
return;
26-
} else if (hide_tracker == null) {
25+
} else {
2726
unmake_exclusive ();
28-
29-
hide_tracker = new HideTracker (wm.get_display (), this);
30-
hide_tracker.hide.connect (hide);
31-
hide_tracker.show.connect (show);
3227
}
33-
34-
hide_tracker.hide_mode = value;
3528
}
3629
}
3730

3831
private GestureController gesture_controller;
39-
private HideTracker? hide_tracker;
32+
private HideTracker hide_tracker;
4033

4134
private int width = -1;
4235
private int height = -1;
@@ -64,15 +57,9 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
6457
gesture_controller = new GestureController (DOCK, wm);
6558
add_gesture_controller (gesture_controller);
6659

67-
window.display.in_fullscreen_changed.connect (() => {
68-
if (wm.get_display ().get_monitor_in_fullscreen (window.get_monitor ())) {
69-
hide ();
70-
} else if (hide_mode == NEVER) {
71-
show ();
72-
} else {
73-
hide_tracker.update_overlap ();
74-
}
75-
});
60+
hide_tracker = new HideTracker (wm.get_display (), this);
61+
hide_tracker.hide.connect (hide);
62+
hide_tracker.show.connect (show);
7663
}
7764

7865
public Mtk.Rectangle get_custom_window_rect () {
@@ -106,10 +93,6 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
10693
}
10794

10895
private void show () {
109-
if (window.display.get_monitor_in_fullscreen (window.get_monitor ())) {
110-
return;
111-
}
112-
11396
gesture_controller.goto (0);
11497
}
11598

src/WindowManager.vala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
namespace Gala {
2020
public class WindowManagerGala : Meta.Plugin, WindowManager {
2121
private const string OPEN_MULTITASKING_VIEW = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1";
22+
private const string OPEN_APPLICATIONS_MENU = "io.elementary.wingpanel --toggle-indicator=app-launcher";
2223

2324
/**
2425
* {@inheritDoc}
@@ -329,6 +330,13 @@ namespace Gala {
329330
});
330331

331332
display.overlay_key.connect (() => {
333+
// Showing panels in fullscreen is broken in X11
334+
if (InternalUtils.get_x11_in_fullscreen (display) &&
335+
behavior_settings.get_string ("overlay-action") == OPEN_APPLICATIONS_MENU
336+
) {
337+
return;
338+
}
339+
332340
launch_action (ActionKeys.OVERLAY_ACTION);
333341
});
334342

src/WindowStateSaver.vala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ public class Gala.WindowStateSaver : GLib.Object {
147147
var app_id = GLib.Markup.escape_text (window_tracker.get_app_for_window (window).id);
148148

149149
var window_index = find_window_index (window, app_id);
150-
app_windows[app_id].remove_index (window_index);
150+
if (window_index < app_windows[app_id].length) {
151+
app_windows[app_id].remove_index (window_index);
152+
}
153+
151154
var value = null; // insert_val requires lvalue
152155
app_windows[app_id].insert_val (window_index, value);
153156

0 commit comments

Comments
 (0)