Skip to content

Commit 420fc87

Browse files
committed
Revert "WorkspaceManager: Queue an idle to add a window (#2271)"
This reverts commit ef6292a.
1 parent 776b82c commit 420fc87

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

src/ShellClients/NotificationsClient.vala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class Gala.NotificationsClient : Object {
2020
client.window_created.connect ((window) => {
2121
window.set_data (NOTIFICATION_DATA_KEY, true);
2222
window.make_above ();
23-
window.stick ();
2423
#if HAS_MUTTER46
2524
client.wayland_client.make_dock (window);
2625
#endif

src/WorkspaceManager.vala

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public class Gala.WorkspaceManager : Object {
8585
return;
8686
}
8787

88-
workspace.window_added.connect (queue_window_added);
88+
workspace.window_added.connect (window_added);
8989
workspace.window_removed.connect (window_removed);
9090
}
9191

@@ -124,15 +124,9 @@ public class Gala.WorkspaceManager : Object {
124124
}
125125
}
126126

127-
private void queue_window_added (Meta.Workspace? workspace, Meta.Window window) {
128-
// We get this call very early so we have to queue an idle for ShellClients
129-
// that might not have checked the window/got a protocol call yet
130-
Idle.add (() => window_added (workspace, window));
131-
}
132-
133-
private bool window_added (Meta.Workspace? workspace, Meta.Window window) {
127+
private void window_added (Meta.Workspace? workspace, Meta.Window window) {
134128
if (workspace == null || !Meta.Prefs.get_dynamic_workspaces () || window.on_all_workspaces) {
135-
return Source.REMOVE;
129+
return;
136130
}
137131

138132
unowned Meta.WorkspaceManager manager = workspace.get_display ().get_workspace_manager ();
@@ -145,8 +139,6 @@ public class Gala.WorkspaceManager : Object {
145139
) {
146140
append_workspace ();
147141
}
148-
149-
return Source.REMOVE;
150142
}
151143

152144
private void window_removed (Meta.Workspace? workspace, Meta.Window window) {
@@ -193,7 +185,7 @@ public class Gala.WorkspaceManager : Object {
193185

194186
private void window_entered_monitor (Meta.Display display, int monitor, Meta.Window window) {
195187
if (InternalUtils.workspaces_only_on_primary () && monitor == display.get_primary_monitor ()) {
196-
queue_window_added (window.get_workspace (), window);
188+
window_added (window.get_workspace (), window);
197189
}
198190
}
199191

@@ -261,7 +253,7 @@ public class Gala.WorkspaceManager : Object {
261253
}
262254
}
263255

264-
workspace.window_added.disconnect (queue_window_added);
256+
workspace.window_added.disconnect (window_added);
265257
workspace.window_removed.disconnect (window_removed);
266258

267259
manager.remove_workspace (workspace, time);

0 commit comments

Comments
 (0)