Skip to content

Commit 95970d5

Browse files
committed
Rename class
1 parent 945e7fa commit 95970d5

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

src/ShellClients/DummyActor.vala renamed to src/ShellClients/DelegateActor.vala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/* This class is used to workaround https://github.com/elementary/gala/issues/2101 */
7-
public class Gala.DummyActor : GLib.Object {
7+
public class Gala.DelegateActor : GLib.Object {
88
public const int OUT_OF_BOUNDS = 1000000;
99

1010
public Meta.WindowActor actor { get; construct; }
@@ -17,14 +17,13 @@ public class Gala.DummyActor : GLib.Object {
1717
public int actual_x { get; private set; default = 0; }
1818
public int actual_y { get; private set; default = 0; }
1919

20-
public DummyActor (Meta.WindowActor actor) {
20+
public DelegateActor (Meta.WindowActor actor) {
2121
Object (actor: actor);
2222
}
2323

2424
construct {
2525
actor.meta_window.position_changed.connect ((_window) => {
2626
var rect = _window.get_frame_rect ();
27-
warning ("Position changed %d %d", rect.x, rect.y);
2827

2928
if (rect.x != OUT_OF_BOUNDS) {
3029
actual_x = rect.x;

src/ShellClients/PanelClone.vala

Lines changed: 7 additions & 7 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-
panel.dummy_actor.notify["x"].connect (update_clone_position);
52-
panel.dummy_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 panel.dummy_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 ? panel.dummy_actor.y - actor.height : panel.dummy_actor.y;
109+
return hidden ? panel.delegate_actor.y - actor.height : panel.delegate_actor.y;
110110
case BOTTOM:
111-
return hidden ? panel.dummy_actor.y + actor.height : panel.dummy_actor.y;
111+
return hidden ? panel.delegate_actor.y + actor.height : panel.delegate_actor.y;
112112
default:
113113
return 0;
114114
}
@@ -128,7 +128,7 @@ public class Gala.PanelClone : Object {
128128
panel_hidden = true;
129129

130130
if (!Meta.Util.is_wayland_compositor ()) {
131-
panel.window.move_frame (false, DummyActor.OUT_OF_BOUNDS, DummyActor.OUT_OF_BOUNDS);
131+
panel.window.move_frame (false, DelegateActor.OUT_OF_BOUNDS, DelegateActor.OUT_OF_BOUNDS);
132132
}
133133

134134
if (panel.anchor != TOP && panel.anchor != BOTTOM) {
@@ -151,7 +151,7 @@ public class Gala.PanelClone : Object {
151151
}
152152

153153
if (!Meta.Util.is_wayland_compositor ()) {
154-
panel.window.move_frame (false, panel.dummy_actor.actual_x, panel.dummy_actor.actual_y);
154+
panel.window.move_frame (false, panel.delegate_actor.actual_x, panel.delegate_actor.actual_y);
155155
}
156156

157157
var animation_duration = get_animation_duration ();

src/ShellClients/PanelWindow.vala

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

1616
public Meta.Side anchor;
1717

18-
public DummyActor dummy_actor;
18+
public DelegateActor delegate_actor;
1919
private PanelClone clone;
2020

2121
private uint idle_move_id = 0;
@@ -46,7 +46,7 @@ public class Gala.PanelWindow : Object {
4646

4747
window.stick ();
4848

49-
dummy_actor = new DummyActor ((Meta.WindowActor) window.get_compositor_private ());
49+
delegate_actor = new DelegateActor ((Meta.WindowActor) window.get_compositor_private ());
5050
clone = new PanelClone (wm, this);
5151

5252
var monitor_manager = wm.get_display ().get_context ().get_backend ().get_monitor_manager ();
@@ -64,8 +64,8 @@ public class Gala.PanelWindow : Object {
6464
public Meta.Rectangle get_custom_window_rect () {
6565
#endif
6666
var window_rect = window.get_frame_rect ();
67-
window_rect.x = dummy_actor.actual_x;
68-
window_rect.y = dummy_actor.actual_y;
67+
window_rect.x = delegate_actor.actual_x;
68+
window_rect.y = delegate_actor.actual_y;
6969

7070
if (width > 0) {
7171
window_rect.width = width;

src/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ gala_bin_sources = files(
4141
'HotCorners/Barrier.vala',
4242
'HotCorners/HotCorner.vala',
4343
'HotCorners/HotCornerManager.vala',
44-
'ShellClients/DummyActor.vala',
44+
'ShellClients/DelegateActor.vala',
4545
'ShellClients/HideTracker.vala',
4646
'ShellClients/ManagedClient.vala',
4747
'ShellClients/NotificationsClient.vala',

0 commit comments

Comments
 (0)