Skip to content

Commit 828d9f2

Browse files
authored
Merge branch 'main' into leolost/interruptible-workspace-switch-mtv
2 parents 6f682da + eca9b14 commit 828d9f2

File tree

7 files changed

+84
-53
lines changed

7 files changed

+84
-53
lines changed

po/hu.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: noise\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2024-12-18 21:23+0000\n"
11-
"PO-Revision-Date: 2024-12-08 11:16+0000\n"
11+
"PO-Revision-Date: 2025-01-16 17:55+0000\n"
1212
"Last-Translator: TomiOhl <[email protected]>\n"
1313
"Language-Team: Hungarian <https://l10n.elementary.io/projects/desktop/gala/"
1414
"hu/>\n"
@@ -17,7 +17,7 @@ msgstr ""
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20-
"X-Generator: Weblate 5.8.4\n"
20+
"X-Generator: Weblate 5.9.2\n"
2121
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
2222

2323
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
@@ -128,17 +128,17 @@ msgstr "Frissített fordítások"
128128

129129
#: data/gala.metainfo.xml.in:35
130130
msgid "Fixed rare crash when a dock window was killed"
131-
msgstr ""
131+
msgstr "Ritka összeomlás javítva dokk ablak leállításakor"
132132

133133
#: data/gala.metainfo.xml.in:36
134134
msgid "Added interactive screenshot shortcut"
135-
msgstr ""
135+
msgstr "Gyorsparancs interaktív képernyőképhez"
136136

137137
#: data/gala.metainfo.xml.in:37
138-
#, fuzzy
139-
#| msgid "Fix potential crash when taking screenshots"
140138
msgid "Fixed crash when using tiling shortcuts"
141-
msgstr "Esetleges összeomlás javítva képernyőkép készítésekor"
139+
msgstr ""
140+
"Összeomlás javítva ablakok felosztásával kapcsolatos gyorsparancsok "
141+
"használatakor"
142142

143143
#: data/gala.metainfo.xml.in:56
144144
msgid "Improved shadows performance"

src/InternalUtils.vala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,5 +388,15 @@ namespace Gala {
388388
Clutter.get_default_backend ().get_default_seat ().bell_notify ();
389389
#endif
390390
}
391+
392+
public static void update_transients_visible (Meta.Window window, bool visible) {
393+
window.foreach_transient ((transient) => {
394+
unowned var actor = (Meta.WindowActor) transient.get_compositor_private ();
395+
396+
actor.visible = visible;
397+
398+
return true;
399+
});
400+
}
391401
}
392402
}

src/ShellClients/HideTracker.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public class Gala.HideTracker : Object {
152152
});
153153
}
154154

155-
private void update_overlap () {
155+
public void update_overlap () {
156156
overlap = false;
157157
focus_overlap = false;
158158
focus_maximized_overlap = false;

src/ShellClients/PanelClone.vala

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public class Gala.PanelClone : Object {
5555
}
5656
});
5757

58+
wm.get_display ().in_fullscreen_changed.connect (check_hide);
59+
5860
Idle.add_once (() => {
5961
if (hide_mode == NEVER) {
6062
show ();
@@ -89,22 +91,38 @@ public class Gala.PanelClone : Object {
8991
return;
9092
}
9193

92-
new GesturePropertyTransition (actor, default_gesture_tracker, "translation-y", null, calculate_translation_y (true)).start (false);
94+
InternalUtils.update_transients_visible (panel.window, false);
95+
96+
new GesturePropertyTransition (
97+
actor, default_gesture_tracker, "translation-y", null, calculate_translation_y (true)
98+
).start (false, () => InternalUtils.update_transients_visible (panel.window, !panel_hidden));
9399

94100
default_gesture_tracker.add_success_callback (false, () => panel_hidden = true);
95101
}
96102

97103
private void show () {
98-
if (!panel_hidden || default_gesture_tracker.recognizing) {
104+
if (!panel_hidden || default_gesture_tracker.recognizing || wm.get_display ().get_monitor_in_fullscreen (panel.window.get_monitor ())) {
99105
return;
100106
}
101107

102108
if (!Meta.Util.is_wayland_compositor ()) {
103109
Utils.x11_unset_window_pass_through (panel.window);
104110
}
105111

106-
new GesturePropertyTransition (actor, default_gesture_tracker, "translation-y", null, calculate_translation_y (false)).start (false);
112+
new GesturePropertyTransition (
113+
actor, default_gesture_tracker, "translation-y", null, calculate_translation_y (false)
114+
).start (false, () => InternalUtils.update_transients_visible (panel.window, !panel_hidden));
107115

108116
default_gesture_tracker.add_success_callback (false, () => panel_hidden = false);
109117
}
118+
119+
private void check_hide () {
120+
if (wm.get_display ().get_monitor_in_fullscreen (panel.window.get_monitor ())) {
121+
hide ();
122+
} else if (hide_mode == NEVER) {
123+
show ();
124+
} else {
125+
hide_tracker.update_overlap ();
126+
}
127+
}
110128
}

src/ShellClients/ShellClientsManager.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public class Gala.ShellClientsManager : Object {
191191
}
192192

193193
private bool is_itself_positioned (Meta.Window window) {
194-
return (window in positioned_windows) || (window in panel_windows);
194+
return (window in positioned_windows) || (window in panel_windows) || NotificationStack.is_notification (window);
195195
}
196196

197197
public bool is_positioned_window (Meta.Window window) {

src/Widgets/MultitaskingView.vala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Gala {
2828
private GestureTracker multitasking_gesture_tracker;
2929
private GestureTracker workspace_gesture_tracker;
3030

31-
public WindowManager wm { get; construct; }
31+
public WindowManagerGala wm { get; construct; }
3232

3333
private Meta.Display display;
3434
private ModalProxy modal_proxy;
@@ -48,7 +48,7 @@ namespace Gala {
4848

4949
private bool switching_workspace_with_gesture = false;
5050

51-
public MultitaskingView (WindowManager wm) {
51+
public MultitaskingView (WindowManagerGala wm) {
5252
Object (wm: wm);
5353
}
5454

@@ -629,6 +629,7 @@ namespace Gala {
629629
wm.background_group.hide ();
630630
wm.window_group.hide ();
631631
wm.top_window_group.hide ();
632+
wm.shell_group.hide ();
632633
show ();
633634
grab_key_focus ();
634635

@@ -691,6 +692,7 @@ namespace Gala {
691692
wm.background_group.show ();
692693
wm.window_group.show ();
693694
wm.top_window_group.show ();
695+
wm.shell_group.show ();
694696

695697
dock_clones.destroy_all_children ();
696698

@@ -719,7 +721,7 @@ namespace Gala {
719721
foreach (unowned Meta.WindowActor actor in window_actors) {
720722
const int MAX_OFFSET = 200;
721723

722-
if (actor.is_destroyed () || !actor.visible) {
724+
if (actor.is_destroyed () || !actor.visible || actor.translation_y != 0) {
723725
continue;
724726
}
725727

src/WindowManager.vala

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ namespace Gala {
3737
*/
3838
public Clutter.Actor top_window_group { get; protected set; }
3939

40-
public Clutter.Actor notification_group { get; protected set; }
40+
/**
41+
* The group that contains all WindowActors that make shell elements, that is all windows reported as
42+
* ShellClientsManager.is_positioned_window.
43+
* It will (eventually) never be hidden by other components and is always on top of everything. Therefore elements are
44+
* responsible themselves for hiding depending on the state we are currently in (e.g. normal desktop, open multitasking view, fullscreen, etc.).
45+
*/
46+
public Clutter.Actor shell_group { get; private set; }
4147

4248
/**
4349
* {@inheritDoc}
@@ -104,8 +110,6 @@ namespace Gala {
104110
private bool animating_switch_workspace = false;
105111
private bool switch_workspace_with_gesture = false;
106112

107-
private signal void window_created (Meta.Window window);
108-
109113
/**
110114
* Amount of pixels to move on the nudge animation.
111115
*/
@@ -253,14 +257,6 @@ namespace Gala {
253257
stage.remove_child (top_window_group);
254258
ui_group.add_child (top_window_group);
255259

256-
#if HAS_MUTTER44
257-
var feedback_group = display.get_compositor ().get_feedback_group ();
258-
#else
259-
var feedback_group = display.get_feedback_group ();
260-
#endif
261-
stage.remove_child (feedback_group);
262-
ui_group.add_child (feedback_group);
263-
264260
// Initialize plugins and add default components if no plugin overrides them
265261
unowned var plugin_manager = PluginManager.get_default ();
266262
plugin_manager.initialize (this);
@@ -293,8 +289,16 @@ namespace Gala {
293289
}
294290

295291
// Add the remaining components that should be on top
296-
notification_group = new Clutter.Actor ();
297-
ui_group.add_child (notification_group);
292+
shell_group = new Clutter.Actor ();
293+
ui_group.add_child (shell_group);
294+
295+
#if HAS_MUTTER44
296+
var feedback_group = display.get_compositor ().get_feedback_group ();
297+
#else
298+
var feedback_group = display.get_feedback_group ();
299+
#endif
300+
stage.remove_child (feedback_group);
301+
ui_group.add_child (feedback_group);
298302

299303
pointer_locator = new PointerLocator (display);
300304
ui_group.add_child (pointer_locator);
@@ -381,12 +385,14 @@ namespace Gala {
381385

382386
update_input_area ();
383387

384-
display.window_created.connect ((window) => window_created (window));
385-
386388
var scroll_action = new SuperScrollAction (display);
387389
scroll_action.triggered.connect (handle_super_scroll);
388390
stage.add_action_full ("wm-super-scroll-action", CAPTURE, scroll_action);
389391

392+
display.window_created.connect ((window) =>
393+
InternalUtils.wait_for_window_actor_visible (window, check_shell_window)
394+
);
395+
390396
stage.show ();
391397

392398
plugin_manager.load_waiting_plugins ();
@@ -1164,6 +1170,17 @@ namespace Gala {
11641170
show_window_menu (window, menu, rect.x, rect.y);
11651171
}
11661172

1173+
private void check_shell_window (Meta.WindowActor actor) {
1174+
unowned var window = actor.get_meta_window ();
1175+
if (ShellClientsManager.get_instance ().is_positioned_window (window)) {
1176+
InternalUtils.clutter_actor_reparent (actor, shell_group);
1177+
}
1178+
1179+
if (NotificationStack.is_notification (window)) {
1180+
notification_stack.show_notification (actor);
1181+
}
1182+
}
1183+
11671184
/*
11681185
* effects
11691186
*/
@@ -1438,12 +1455,8 @@ namespace Gala {
14381455
actor.remove_all_transitions ();
14391456
actor.show ();
14401457

1441-
// Notifications are a special case and have to be always be handled
1442-
// (also regardless of the animation setting)
1458+
// Notifications initial animation is handled by the notification stack
14431459
if (NotificationStack.is_notification (window)) {
1444-
InternalUtils.clutter_actor_reparent (actor, notification_group);
1445-
notification_stack.show_notification (actor);
1446-
14471460
map_completed (actor);
14481461
return;
14491462
}
@@ -1845,7 +1858,6 @@ namespace Gala {
18451858
private List<Clutter.Actor>? windows;
18461859
private List<Clutter.Actor>? parents;
18471860
private List<Clutter.Actor>? tmp_actors;
1848-
private ulong switch_workspace_window_created_id = 0;
18491861
private Clutter.Actor? out_group;
18501862
private Clutter.Actor? in_group;
18511863
private Clutter.Actor? wallpaper;
@@ -1934,7 +1946,10 @@ namespace Gala {
19341946
continue;
19351947
}
19361948

1937-
if (!window.showing_on_its_workspace () || move_primary_only && !window.is_on_primary_monitor ()) {
1949+
if (!window.showing_on_its_workspace () ||
1950+
move_primary_only && !window.is_on_primary_monitor () ||
1951+
actor.get_parent () == shell_group
1952+
) {
19381953
continue;
19391954
}
19401955

@@ -2047,17 +2062,6 @@ namespace Gala {
20472062

20482063
prepare_workspace_switch (from, to, direction);
20492064

2050-
// while a workspace is being switched mutter doesn't map windows
2051-
// TODO: currently only notifications are handled here, other windows should be too
2052-
switch_workspace_window_created_id = window_created.connect ((window) => {
2053-
if (NotificationStack.is_notification (window)) {
2054-
InternalUtils.wait_for_window_actor_visible (window, (actor) => {
2055-
InternalUtils.clutter_actor_reparent (actor, notification_group);
2056-
notification_stack.show_notification (actor);
2057-
});
2058-
}
2059-
});
2060-
20612065
var animation_mode = Clutter.AnimationMode.EASE_OUT_CUBIC;
20622066

20632067
var x2 = -in_group.x;
@@ -2129,11 +2133,8 @@ namespace Gala {
21292133
return;
21302134
}
21312135

2132-
if (switch_workspace_window_created_id > 0) {
2133-
disconnect (switch_workspace_window_created_id);
2134-
switch_workspace_window_created_id = 0;
2135-
}
21362136
end_switch_workspace ();
2137+
21372138
if (!is_nudge_animation) {
21382139
switch_workspace_completed ();
21392140
}
@@ -2159,7 +2160,7 @@ namespace Gala {
21592160
}
21602161

21612162
private void end_switch_workspace () {
2162-
if (windows == null || parents == null)
2163+
if ((windows == null || parents == null) && tmp_actors == null)
21632164
return;
21642165

21652166
unowned var display = get_display ();

0 commit comments

Comments
 (0)