Skip to content

Commit 4ede612

Browse files
committed
Add comment on exclude
1 parent 6f4b25e commit 4ede612

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Utils.vala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,15 @@ namespace Gala {
266266

267267
/**
268268
* Get the number of toplevel windows on a workspace excluding those that are
269-
* on all workspaces
269+
* on all workspaces.
270+
*
271+
* We need `exclude` here because on Meta.Workspace.window_removed
272+
* the windows gets removed from workspace's internal window list but not display's window list
273+
* which Meta.Workspace uses for Meta.Workspace.list_windows ().
270274
*
271275
* @param workspace The workspace on which to count the windows
272276
* @param exclude a window to not count
277+
*
273278
*/
274279
public static uint get_n_windows (Meta.Workspace workspace, bool on_primary = false, Meta.Window? exclude = null) {
275280
var n = 0;

0 commit comments

Comments
 (0)