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

Sometimes toggle desktop has to be clicked twice to minimize the windows #79

Open
kurokawachan opened this issue Aug 26, 2024 · 0 comments

Comments

@kurokawachan
Copy link
Contributor

Assuming we are using openbox as window manager.

How to produce this issue

  • Open some random windows.

    Here, we are not showing the Desktop

  • Click the toggle to show the desktop.

    Showing the desktop

  • Click again.

    Not showing

  • Click again.

    Showing.

  • Click again.

    Not showing

  • Click again.

    Showing, and all windows are minimized.

  • We click only one window icon to raise one window from the minimized state

    And here we are not showing the Desktop.

  • Right now, if we click the toggle again, we would have to click two times to show the desktop instead of one time

Why

Inside the function wincmd_button_clicked, we are using wc->toggle_state to track the state we are in. Each time we click it, we toggle it on or off. We know the current state the window manager is in by using this variable.

However, if we click on the window directly, we do not modify this variable. So, we thought we are showing the desktop while we are not.

What should we do?

When using the window manager _NET_SHOWING_DESKTOP mode, we should read the state from the window manager instead of remembering it. The ideal way is actually requesting the window manager to toggle the value directly. However, I don't think it is possible using X11. So, we should read the state from the window manager and toggle it and request again.

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