Skip to content

Commit bcfa1ac

Browse files
authored
Merge branch 'main' into leolost/disable-unredirection-shell-windows
2 parents 9e4275f + c347748 commit bcfa1ac

File tree

4 files changed

+40
-39
lines changed

4 files changed

+40
-39
lines changed

po/pl.po

Lines changed: 6 additions & 7 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: 2025-06-30 17:54+0000\n"
11-
"PO-Revision-Date: 2025-03-30 11:55+0000\n"
11+
"PO-Revision-Date: 2025-07-07 19:55+0000\n"
1212
"Last-Translator: Marcin Serwin <[email protected]>\n"
1313
"Language-Team: Polish <https://l10n.elementaryos.org/projects/desktop/gala/"
1414
"pl/>\n"
@@ -18,7 +18,7 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
2020
"|| 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-04-20 06:29+0000\n"
2323

2424
#: daemon/DBus.vala:84 daemon-gtk3/BackgroundMenu.vala:11
@@ -135,11 +135,11 @@ msgstr "Stan okna jest teraz zapisywany przy usypianiu i wyłączaniu"
135135

136136
#: data/gala.metainfo.xml.in:103
137137
msgid "Remove scaling effect from menus"
138-
msgstr ""
138+
msgstr "Usuń efekt skalowania z menu"
139139

140140
#: data/gala.metainfo.xml.in:104
141141
msgid "Swipe up to close windows in Multitasking View"
142-
msgstr ""
142+
msgstr "Przeciągnij w górę aby zamknąć okna w widoku wielozadaniowym"
143143

144144
#: data/gala.metainfo.xml.in:135
145145
msgid "Fixed rare crash when a dock window was killed"
@@ -284,10 +284,9 @@ msgstr "Zrzut ekranu z %s"
284284

285285
#. / TRANSLATORS: %s represents a name of file manager
286286
#: src/ScreenshotManager.vala:167
287-
#, fuzzy, c-format
288-
#| msgid "Show in Files"
287+
#, c-format
289288
msgid "Show in %s"
290-
msgstr "Pokaż w Plikach"
289+
msgstr "Pokaż w %s"
291290

292291
#: src/ScreenshotManager.vala:174 src/ScreenshotManager.vala:553
293292
msgid "Screenshot taken"

src/ShellClients/PanelWindow.vala

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
3131
private GestureController gesture_controller;
3232
private HideTracker hide_tracker;
3333

34-
private int width = -1;
35-
private int height = -1;
36-
3734
public PanelWindow (WindowManager wm, Meta.Window window, Pantheon.Desktop.Anchor anchor) {
3835
Object (wm: wm, anchor: anchor, window: window, position: Position.from_anchor (anchor));
3936
}
@@ -53,6 +50,8 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
5350

5451
window.size_changed.connect (update_strut);
5552
window.position_changed.connect (update_strut);
53+
notify["width"].connect (update_strut);
54+
notify["height"].connect (update_strut);
5655

5756
gesture_controller = new GestureController (DOCK, wm);
5857
add_gesture_controller (gesture_controller);
@@ -62,32 +61,6 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
6261
hide_tracker.show.connect (show);
6362
}
6463

65-
public Mtk.Rectangle get_custom_window_rect () {
66-
var window_rect = window.get_frame_rect ();
67-
68-
if (width > 0) {
69-
window_rect.width = width;
70-
}
71-
72-
if (height > 0) {
73-
window_rect.height = height;
74-
75-
if (anchor == BOTTOM) {
76-
var geom = wm.get_display ().get_monitor_geometry (window.get_monitor ());
77-
window_rect.y = geom.y + geom.height - height;
78-
}
79-
}
80-
81-
return window_rect;
82-
}
83-
84-
public void set_size (int width, int height) {
85-
this.width = width;
86-
this.height = height;
87-
88-
update_strut ();
89-
}
90-
9164
private void hide () {
9265
gesture_controller.goto (1);
9366
}

src/ShellClients/PositionedWindow.vala

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public class Gala.PositionedWindow : Object {
2929
public Position position { get; construct set; }
3030
public Variant? position_data { get; construct set; }
3131

32+
private int width = -1;
33+
private int height = -1;
34+
3235
private ulong position_changed_id;
3336

3437
public PositionedWindow (Meta.Window window, Position position, Variant? position_data = null) {
@@ -50,6 +53,30 @@ public class Gala.PositionedWindow : Object {
5053
notify["position-data"].connect (position_window);
5154
}
5255

56+
public Mtk.Rectangle get_custom_window_rect () {
57+
var window_rect = window.get_frame_rect ();
58+
59+
if (width > 0) {
60+
window_rect.width = width;
61+
}
62+
63+
if (height > 0) {
64+
window_rect.height = height;
65+
66+
if (position == BOTTOM) {
67+
var geom = window.display.get_monitor_geometry (window.get_monitor ());
68+
window_rect.y = geom.y + geom.height - height;
69+
}
70+
}
71+
72+
return window_rect;
73+
}
74+
75+
public void set_size (int width, int height) {
76+
this.width = width;
77+
this.height = height;
78+
}
79+
5380
private void position_window () {
5481
int x = 0, y = 0;
5582
var window_rect = window.get_frame_rect ();

src/ShellClients/ShellWindow.vala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class Gala.ShellWindow : PositionedWindow, GestureTarget {
2929
window_actor.notify["translation-y"].connect (update_clip);
3030
notify["position"].connect (update_clip);
3131

32-
window_actor.notify["height"].connect (update_target);
32+
window.size_changed.connect (update_target);
3333
notify["position"].connect (update_target);
3434
update_target ();
3535
}
@@ -150,11 +150,13 @@ public class Gala.ShellWindow : PositionedWindow, GestureTarget {
150150
}
151151

152152
private Value calculate_value (bool hidden) {
153+
var custom_rect = get_custom_window_rect ();
154+
153155
switch (position) {
154156
case TOP:
155-
return hidden ? -window_actor.height : 0f;
157+
return hidden ? -custom_rect.height : 0f;
156158
case BOTTOM:
157-
return hidden ? window_actor.height : 0f;
159+
return hidden ? custom_rect.height : 0f;
158160
default:
159161
return hidden ? 0u : 255u;
160162
}

0 commit comments

Comments
 (0)