Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some icons fail to appear when "displaying unpinned apps only from current workspace" #210

Open
pawel-tarasiuk opened this issue Aug 25, 2022 · 0 comments

Comments

@pawel-tarasiuk
Copy link

pawel-tarasiuk commented Aug 25, 2022

When unpinned apps are set to be shown only when they match the current workspace, some of them fail to show at all. Apparently, Dock.window_added can be called before wnck can tell that the window exists and which workspace is it assigned to.

One possible, yet terribly dirty fix is to make DockedApp.has_windows_on_workspace broader, so it matches not only "windows assigned to wnck_workspace" but "windows that are not assigned to any other workspace" as well. However, I hope that this issue can be resolved in some more fitted way, as this (not-really-a-)suggestion is likely to break some other cases.

`

def has_windows_on_workspace(self, wnck_workspace):
    """ test whether the app has at least one window open on a specified
        workspace

    Args:
        wnck_workspace - the workspace to check for

    Returns:
        boolean
    """

    other = False

    for win in self.get_windows():
        wnck_win = Wnck.Window.get(win.get_xid())
        if wnck_win is not None:
            win_ws = wnck_win.get_workspace()
            if win_ws == wnck_workspace:
                return True
            else:
                other = True

    return not other

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant