Skip to content

Commit eff2bc9

Browse files
authored
Merge branch 'main' into leolost/panel-window-use-window-positioner
2 parents 97cfa04 + 1e8c880 commit eff2bc9

File tree

9 files changed

+89
-32
lines changed

9 files changed

+89
-32
lines changed

data/gala.metainfo.xml.in

Lines changed: 2 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.4" date="2024-11-23" urgency="medium">
30+
<release version="8.0.4" date="2024-12-02" urgency="medium">
3131
<description>
3232
<p>Improvements:</p>
3333
<ul>
@@ -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

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.3',
3+
version: '8.0.4',
44
meson_version: '>= 0.59.0',
55
license: 'GPL3',
66
)

po/fi.po

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ 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-08-07 18:17+0000\n"
12-
"Last-Translator: anonymous <[email protected]>\n"
13-
"Language-Team: Finnish <https://l10n.elementary.io/projects/desktop/gala/fi/"
14-
">\n"
11+
"PO-Revision-Date: 2024-12-02 05:14+0000\n"
12+
"Last-Translator: Jiri Grönroos <[email protected]>\n"
13+
"Language-Team: Finnish <https://l10n.elementary.io/projects/desktop/gala/fi/>"
14+
"\n"
1515
"Language: fi\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
@@ -33,14 +33,12 @@ msgid "System Settings…"
3333
msgstr "Järjestelmän asetukset…"
3434

3535
#: daemon/DBus.vala:207 daemon-gtk3/BackgroundMenu.vala:47
36-
#, fuzzy
37-
#| msgid "System Settings…"
3836
msgid "Failed to open System Settings"
39-
msgstr "Järjestelmän asetukset…"
37+
msgstr "Järjestelmän asetusten avaaminen epäonnistui"
4038

4139
#: daemon/DBus.vala:208 daemon-gtk3/BackgroundMenu.vala:48
4240
msgid "A handler for the “settings://” URI scheme must be installed."
43-
msgstr ""
41+
msgstr "Käsittelijä “settings://”-URI-skeemalle pitää olla asennettu."
4442

4543
#: daemon-gtk3/WindowMenu.vala:36 daemon/WindowMenu.vala:38
4644
msgid "Hide"
@@ -188,11 +186,11 @@ msgstr "Varatyöpöytätiedosto vanhanaikaisten sovellusten ilmoituksia varten."
188186
#: lib/App.vala:51
189187
msgctxt "program"
190188
msgid "Unknown"
191-
msgstr ""
189+
msgstr "Tuntematon"
192190

193191
#: src/DesktopIntegration.vala:133
194192
msgid "Window has already focus"
195-
msgstr ""
193+
msgstr "Ikkunalla on jo kohdistus"
196194

197195
#: src/Dialogs.vala:144
198196
#, c-format
@@ -222,23 +220,23 @@ msgstr "Odota"
222220
#: src/Dialogs.vala:217
223221
#, c-format
224222
msgid "“%s” wants to inhibit system shortcuts"
225-
msgstr ""
223+
msgstr "“%s” haluaa rajoittaa järjestelmän pikanäppäimiä"
226224

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

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

235233
#: src/Dialogs.vala:223
236234
msgid "Allow"
237235
msgstr "Salli"
238236

239237
#: src/Dialogs.vala:224
240238
msgid "Deny"
241-
msgstr ""
239+
msgstr "Estä"
242240

243241
#: src/ScreenshotManager.vala:296
244242
msgid "Screenshots"
@@ -250,7 +248,7 @@ msgstr "Kuvakaappaus otettu"
250248

251249
#: src/Widgets/WindowSwitcher/WindowSwitcher.vala:73
252250
msgid "Window switcher"
253-
msgstr ""
251+
msgstr "Ikkunavaihdin"
254252

255253
#: src/WindowManager.vala:2355
256254
#, 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/HideTracker.vala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public class Gala.HideTracker : Object {
4141
if (hide_timeout_id != 0) {
4242
Source.remove (hide_timeout_id);
4343
}
44+
45+
if (update_timeout_id != 0) {
46+
Source.remove (update_timeout_id);
47+
}
4448
}
4549

4650
construct {
@@ -95,7 +99,7 @@ public class Gala.HideTracker : Object {
9599
setup_barrier ();
96100
}
97101

98-
//Can be removed with mutter > 45
102+
#if !HAS_MUTTER45
99103
private bool window_has_pointer () {
100104
var cursor_tracker = display.get_cursor_tracker ();
101105
Graphene.Point pointer_pos;
@@ -114,6 +118,7 @@ public class Gala.HideTracker : Object {
114118
};
115119
return graphene_window_rect.contains_point (pointer_pos);
116120
}
121+
#endif
117122

118123
private void track_focus_window (Meta.Window? window) {
119124
if (window == null) {

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
private WindowPositioner window_positioner;
1717

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

2021
private int width = -1;
@@ -33,6 +34,7 @@ public class Gala.PanelWindow : Object {
3334

3435
window.stick ();
3536

37+
delegate_actor = new DelegateActor ((Meta.WindowActor) window.get_compositor_private ());
3638
clone = new PanelClone (wm, this);
3739

3840
var display = wm.get_display ();
@@ -55,6 +57,8 @@ public class Gala.PanelWindow : Object {
5557
public Meta.Rectangle get_custom_window_rect () {
5658
#endif
5759
var window_rect = window.get_frame_rect ();
60+
window_rect.x = delegate_actor.actual_x;
61+
window_rect.y = delegate_actor.actual_y;
5862

5963
if (width > 0) {
6064
window_rect.width = width;

src/WindowManager.vala

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,12 @@ namespace Gala {
410410
private void launch_action (string action_key) {
411411
try {
412412
var action = behavior_settings.get_string (action_key);
413-
if (action != null && action != "") {
413+
if (action != null) {
414414
Process.spawn_command_line_async (action);
415415
}
416-
} catch (Error e) { warning (e.message); }
416+
} catch (Error e) {
417+
warning (e.message);
418+
}
417419
}
418420

419421
private void on_monitors_changed () {
@@ -1045,13 +1047,7 @@ namespace Gala {
10451047
current.@delete (Gtk.get_current_event_time ());
10461048
break;
10471049
case ActionType.OPEN_LAUNCHER:
1048-
try {
1049-
Process.spawn_command_line_async (
1050-
behavior_settings.get_string ("panel-main-menu-action")
1051-
);
1052-
} catch (Error e) {
1053-
warning (e.message);
1054-
}
1050+
launch_action ("panel-main-menu-action");
10551051
break;
10561052
case ActionType.WINDOW_OVERVIEW:
10571053
if (window_overview == null) {
@@ -1300,6 +1296,8 @@ namespace Gala {
13001296
case Meta.SizeChange.UNFULLSCREEN:
13011297
handle_fullscreen_window (window, which_change_local);
13021298
break;
1299+
default:
1300+
break;
13031301
}
13041302

13051303
size_change_completed (actor);

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)