mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-10 17:51:53 -07:00
fix: focusWindow on hidden workspace triggers another focusWindow. (#3216)
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.
This commit is contained in:
@@ -102,7 +102,7 @@ class CMonitor {
|
||||
void setMirror(const std::string&);
|
||||
bool isMirror();
|
||||
float getDefaultScale();
|
||||
void changeWorkspace(CWorkspace* const pWorkspace, bool internal = false);
|
||||
void changeWorkspace(CWorkspace* const pWorkspace, bool internal = false, bool noMouseMove = false);
|
||||
void changeWorkspace(const int& id, bool internal = false);
|
||||
void setSpecialWorkspace(CWorkspace* const pWorkspace);
|
||||
void setSpecialWorkspace(const int& id);
|
||||
|
Reference in New Issue
Block a user