feat: Allow Mouse to Follow Cursor onto Empty Workspace and Simulate Mouse Click to Facilitate Launching Flow Launcher Search #557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's my attempt to address Issue #554 which allows Flow Launcher to launch search on an empty workspace as well as other programs that do not like that funky state of a Workspace that has been focused but not clicked (e.g., Windows Screenshot Tool).
I'm an avid user of i3 and am very happy that this project exists which allows me to have nearly the same experience on my Windows machine. Thanks and kudos to the devs who started this!
Overview of Changes:
FocusedContainer
is aGlazeWM.Domains.Workspaces.Workspace
type container. I modified the.Where()
on WmStartup.cs:123 to also invoke theCenterCursorOnContainerCommand
when this happens. This allows for the cursor to follow onto an empty workspace.(I can't even initiate the Windows Screenshot tool (WIN+SHIFT+S) to get a full screenshot of the highlighted workspace number and the title of the last window on my polybar when in this state so it's not just Flow Launcher that's having issues.)
When I click on the empty workspace, that seems to effectively focus the workspace and the polybar title is cleared and I can launch Flow Launcher (and the Windows Screenshot tool).
SendInput
along with the required structs for Mouse Input and added that to theCenterCursorOnContainerHandler
with a check that the container is of typeWorkspace
.