Skip to content

Commit f8bd6cf

Browse files
committed
We dont need idle
1 parent e0d73b4 commit f8bd6cf

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

src/ShellClients/WindowPositioner.vala

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ public class Gala.WindowPositioner : Object {
1313

1414
private PositionFunc position_func;
1515

16-
private uint idle_move_id = 0;
17-
1816
public WindowPositioner (Meta.Window window, WindowManager wm, owned PositionFunc position_func) {
1917
Object (window: window, wm: wm);
2018

@@ -31,29 +29,12 @@ public class Gala.WindowPositioner : Object {
3129
var monitor_manager = wm.get_display ().get_context ().get_backend ().get_monitor_manager ();
3230
monitor_manager.monitors_changed.connect (position_window);
3331
monitor_manager.monitors_changed_internal.connect (position_window);
34-
35-
position_window ();
36-
37-
window.unmanaging.connect (() => {
38-
if (idle_move_id != 0) {
39-
Source.remove (idle_move_id);
40-
}
41-
});
4232
}
4333

4434
private void position_window () {
45-
if (idle_move_id != 0) {
46-
Source.remove (idle_move_id);
47-
}
48-
49-
idle_move_id = Idle.add (() => {
50-
int x = 0, y = 0;
51-
position_func (ref x, ref y);
52-
53-
window.move_frame (false, x, y);
35+
int x = 0, y = 0;
36+
position_func (ref x, ref y);
5437

55-
idle_move_id = 0;
56-
return Source.REMOVE;
57-
});
38+
window.move_frame (false, x, y);
5839
}
5940
}

0 commit comments

Comments
 (0)