Skip to content

Commit

Permalink
Add comment on exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
lenemter committed Dec 18, 2024
1 parent 6f4b25e commit 4ede612
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Utils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,15 @@ namespace Gala {

/**
* Get the number of toplevel windows on a workspace excluding those that are
* on all workspaces
* on all workspaces.
*
* We need `exclude` here because on Meta.Workspace.window_removed
* the windows gets removed from workspace's internal window list but not display's window list
* which Meta.Workspace uses for Meta.Workspace.list_windows ().
*
* @param workspace The workspace on which to count the windows
* @param exclude a window to not count
*
*/
public static uint get_n_windows (Meta.Workspace workspace, bool on_primary = false, Meta.Window? exclude = null) {
var n = 0;
Expand Down

0 comments on commit 4ede612

Please sign in to comment.