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

Add set_mouse_pass_through and is_foreground_window #2402

Merged
merged 9 commits into from
Oct 22, 2024

Conversation

AlexKnauth
Copy link
Contributor

  • set_mouse_pass_through sets whether the mouse passes through the window to whatever is behind.
  • is_foreground_window returns true if the window is the foreground window or this is unknown, and returns false if a different window is known to be the foreground window.

@jaredoconnell
Copy link
Contributor

What is the intended use of these features?
These types of features are not the easiest to test.

@AlexKnauth
Copy link
Contributor Author

AlexKnauth commented May 21, 2024

My intended use is for LiveSplit One, which is a speedrun timer meant to be used while playing a game. If a user is playing the game using their mouse, they will want their mouse events to pass through the timer window (which will be semi-transparent). They will not want to be able to accidentally click on the timer and have that pull focus away from their game.

(Edit: Similar to the "Ignore Mouse While Running and Not In Focus" setting in the Windows version of LiveSplit)

@AlexKnauth AlexKnauth force-pushed the mouse_pass_through branch from f47adb8 to 40aed37 Compare May 23, 2024 02:17
@AlexKnauth
Copy link
Contributor Author

For testing these features, would it help more to add a new example to druid/examples, or to modify an existing example like input_region.rs?

@jacksongoode
Copy link

jacksongoode commented Jul 27, 2024

@linebender @cmyr Would it make sense to set someone as a maintainer of this project so new fixes and PR's can come in?

@jaredoconnell
Copy link
Contributor

@linebender @cmyr Would it make sense to set someone as a maintainer of this project so new fixes and PR's can come in?

I believe the current intention is to archive the project once Xilem is a reasonable replacement of Druid. At that point, if someone would like to fork the project, that's the only path forward.

Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

The input_region example modification seems somewhat flakey, as once the passthrough gets switched on I can't switch it back off even if the window is in the foreground again.

Even so, the code in this PR doesn't really break any existing features and has some value, so I'll go ahead and merge.

Thanks!

@xStrom xStrom added this pull request to the merge queue Oct 22, 2024
Merged via the queue into linebender:master with commit e7f49e7 Oct 22, 2024
12 checks passed
@xStrom xStrom added this to the Release 0.9 milestone Oct 25, 2024
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.

4 participants