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

fix: focusWindow on hidden workspace triggers another focusWindow #3216

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

memchr
Copy link
Contributor

@memchr memchr commented Sep 8, 2023

Abstract

This commit address an issue where focusing a window on a hidden
workspace inadvertently triggered a second focusWindow call due to
simulated mouse movement. This behaviour led to the incorrect focus on
the window under the cursor instead of target window of method
focusWindow(), disrupting focusurgentorlast and focuscurrentorlast
dispatchers.

Implementation

Introduced a flag to the CMonitor::changeWorkspace()
method to prevent simulated mouse movements. This flag is set to false
by default. Changed the focusWindow() method accordingly to set this
flag to true when the target window is in a hidden workspace.

This commit address an issue where focusing a window on a hidden
workspace inadvertently triggered a second `focusWindow` call due to
simulated mouse movement. This behaviour led to the incorrect focus on
the window under the cursor instead of target window of method
`focusWindow()`, disrupting `focusurgentorlast` and `focuscurrentorlast`
dispatchers. Introduced a flag to the `CMonitor::changeWorkspace()`
method to prevent simulated mouse movements. This flag is set to false
by default. Changed the `focusWindow()` method accordingly to set this
flag to true when the target window is in a hidden workspace.
@memchr memchr changed the title Fix_focuswindow fix: focusWindow on hidden workspace triggers another focusWindow Sep 8, 2023
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k

@vaxerski vaxerski merged commit 6648274 into hyprwm:main Sep 8, 2023
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants