Skip to content

Commit 2b92505

Browse files
authored
Merge branch 'main' into leolost/fix-notification-segfault
2 parents 719c2db + ff53f5f commit 2b92505

File tree

6 files changed

+69
-13
lines changed

6 files changed

+69
-13
lines changed

data/gala.metainfo.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
</ul>
3737
</description>
3838
<issues>
39+
<issue url="https://github.com/elementary/gala/issues/2101">Dock interacts with the mouse even with the window overlapping</issue>
3940
</issues>
4041
</release>
4142

po/fi.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: gala\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-11-23 16:06+0000\n"
11-
"PO-Revision-Date: 2024-12-01 13:02+0000\n"
11+
"PO-Revision-Date: 2024-12-02 05:14+0000\n"
1212
"Last-Translator: Jiri Grönroos <[email protected]>\n"
1313
"Language-Team: Finnish <https://l10n.elementary.io/projects/desktop/gala/fi/>"
1414
"\n"
@@ -186,11 +186,11 @@ msgstr "Varatyöpöytätiedosto vanhanaikaisten sovellusten ilmoituksia varten."
186186
#: lib/App.vala:51
187187
msgctxt "program"
188188
msgid "Unknown"
189-
msgstr ""
189+
msgstr "Tuntematon"
190190

191191
#: src/DesktopIntegration.vala:133
192192
msgid "Window has already focus"
193-
msgstr ""
193+
msgstr "Ikkunalla on jo kohdistus"
194194

195195
#: src/Dialogs.vala:144
196196
#, c-format
@@ -220,23 +220,23 @@ msgstr "Odota"
220220
#: src/Dialogs.vala:217
221221
#, c-format
222222
msgid "“%s” wants to inhibit system shortcuts"
223-
msgstr ""
223+
msgstr "“%s” haluaa rajoittaa järjestelmän pikanäppäimiä"
224224

225225
#: src/Dialogs.vala:219
226226
msgid "An application wants to inhibit system shortcuts"
227-
msgstr ""
227+
msgstr "Sovellus haluaa rajoittaa järjestelmän pikanäppäimiä"
228228

229229
#: src/Dialogs.vala:222
230230
msgid "All system shortcuts will be redirected to the application."
231-
msgstr ""
231+
msgstr "Kaikki järjestelmän pikanäppäimet ohjataan sovellukselle."
232232

233233
#: src/Dialogs.vala:223
234234
msgid "Allow"
235235
msgstr "Salli"
236236

237237
#: src/Dialogs.vala:224
238238
msgid "Deny"
239-
msgstr ""
239+
msgstr "Estä"
240240

241241
#: src/ScreenshotManager.vala:296
242242
msgid "Screenshots"
@@ -248,7 +248,7 @@ msgstr "Kuvakaappaus otettu"
248248

249249
#: src/Widgets/WindowSwitcher/WindowSwitcher.vala:73
250250
msgid "Window switcher"
251-
msgstr ""
251+
msgstr "Ikkunavaihdin"
252252

253253
#: src/WindowManager.vala:2355
254254
#, c-format
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* SPDX-License-Identifier: GPL-3.0-or-later
3+
* SPDX-FileCopyrightText: 2024 elementary, Inc. (https://elementary.io)
4+
*/
5+
6+
/* This class is used to workaround https://github.com/elementary/gala/issues/2101 */
7+
public class Gala.DelegateActor : GLib.Object {
8+
public const int OUT_OF_BOUNDS = 1000000;
9+
10+
public Meta.WindowActor actor { get; construct; }
11+
12+
/* Current window actor position or position before the window was moved out of bounds */
13+
public float x { get; private set; default = 0.0f; }
14+
public float y { get; private set; default = 0.0f; }
15+
16+
/* Current window position or position before it was moved out of bounds */
17+
public int actual_x { get; private set; default = 0; }
18+
public int actual_y { get; private set; default = 0; }
19+
20+
public DelegateActor (Meta.WindowActor actor) {
21+
Object (actor: actor);
22+
}
23+
24+
construct {
25+
actor.meta_window.position_changed.connect ((_window) => {
26+
var rect = _window.get_frame_rect ();
27+
28+
if (rect.x != OUT_OF_BOUNDS) {
29+
actual_x = rect.x;
30+
Idle.add_once (() => {
31+
x = actor.x;
32+
});
33+
}
34+
if (rect.y != OUT_OF_BOUNDS) {
35+
actual_y = rect.y;
36+
Idle.add_once (() => {
37+
y = actor.y;
38+
});
39+
}
40+
});
41+
}
42+
}

src/ShellClients/PanelClone.vala

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public class Gala.PanelClone : Object {
4848
actor = (Meta.WindowActor) panel.window.get_compositor_private ();
4949
// WindowActor position and Window position aren't necessarily the same.
5050
// The clone needs the actor position
51-
actor.notify["x"].connect (update_clone_position);
52-
actor.notify["y"].connect (update_clone_position);
51+
panel.delegate_actor.notify["x"].connect (update_clone_position);
52+
panel.delegate_actor.notify["y"].connect (update_clone_position);
5353
// Actor visibility might be changed by something else e.g. workspace switch
5454
// but we want to keep it in sync with us
5555
actor.notify["visible"].connect (update_visible);
@@ -97,7 +97,7 @@ public class Gala.PanelClone : Object {
9797
switch (panel.anchor) {
9898
case TOP:
9999
case BOTTOM:
100-
return actor.x;
100+
return panel.delegate_actor.x;
101101
default:
102102
return 0;
103103
}
@@ -106,9 +106,9 @@ public class Gala.PanelClone : Object {
106106
private float calculate_clone_y (bool hidden) {
107107
switch (panel.anchor) {
108108
case TOP:
109-
return hidden ? actor.y - actor.height : actor.y;
109+
return hidden ? panel.delegate_actor.y - actor.height : panel.delegate_actor.y;
110110
case BOTTOM:
111-
return hidden ? actor.y + actor.height : actor.y;
111+
return hidden ? panel.delegate_actor.y + actor.height : panel.delegate_actor.y;
112112
default:
113113
return 0;
114114
}
@@ -127,6 +127,10 @@ public class Gala.PanelClone : Object {
127127

128128
panel_hidden = true;
129129

130+
if (!Meta.Util.is_wayland_compositor ()) {
131+
panel.window.move_frame (false, DelegateActor.OUT_OF_BOUNDS, DelegateActor.OUT_OF_BOUNDS);
132+
}
133+
130134
if (panel.anchor != TOP && panel.anchor != BOTTOM) {
131135
warning ("Animated hide not supported for side yet.");
132136
return;
@@ -146,6 +150,10 @@ public class Gala.PanelClone : Object {
146150
return;
147151
}
148152

153+
if (!Meta.Util.is_wayland_compositor ()) {
154+
panel.window.move_frame (false, panel.delegate_actor.actual_x, panel.delegate_actor.actual_y);
155+
}
156+
149157
clone.save_easing_state ();
150158
clone.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
151159
clone.set_easing_duration (get_animation_duration ());

src/ShellClients/PanelWindow.vala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class Gala.PanelWindow : Object {
1515

1616
public Meta.Side anchor;
1717

18+
public DelegateActor delegate_actor;
1819
private PanelClone clone;
1920

2021
private uint idle_move_id = 0;
@@ -45,6 +46,7 @@ public class Gala.PanelWindow : Object {
4546

4647
window.stick ();
4748

49+
delegate_actor = new DelegateActor ((Meta.WindowActor) window.get_compositor_private ());
4850
clone = new PanelClone (wm, this);
4951

5052
var monitor_manager = wm.get_display ().get_context ().get_backend ().get_monitor_manager ();
@@ -62,6 +64,8 @@ public class Gala.PanelWindow : Object {
6264
public Meta.Rectangle get_custom_window_rect () {
6365
#endif
6466
var window_rect = window.get_frame_rect ();
67+
window_rect.x = delegate_actor.actual_x;
68+
window_rect.y = delegate_actor.actual_y;
6569

6670
if (width > 0) {
6771
window_rect.width = width;

src/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ gala_bin_sources = files(
4141
'HotCorners/Barrier.vala',
4242
'HotCorners/HotCorner.vala',
4343
'HotCorners/HotCornerManager.vala',
44+
'ShellClients/DelegateActor.vala',
4445
'ShellClients/HideTracker.vala',
4546
'ShellClients/ManagedClient.vala',
4647
'ShellClients/NotificationsClient.vala',

0 commit comments

Comments
 (0)