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

Don't handle mouse clicks without focus #7747

Open
nixpulvis opened this issue Feb 18, 2024 · 6 comments
Open

Don't handle mouse clicks without focus #7747

nixpulvis opened this issue Feb 18, 2024 · 6 comments

Comments

@nixpulvis
Copy link
Contributor

I often click carelessly on a window to bring it into focus; I suspect this is somewhat common though I suppose I could just be overly impulsive with my window management these days. My patience has run thin.

Anyway, I think it would make sense to either:

  1. Disallow click handling without focus
  2. Change the cursor to a hand

Seeing a pointer, proceeding to click, then being launched into a browser is somewhat surprising.

@kchibisov
Copy link
Member

when you click, the focus is usually transferred to the window and then click happens, so pretty much impossible to solve unless you do that on purpose with heuristics, but it's just bad.

@nixpulvis
Copy link
Contributor Author

I feared that. What's stopping us from changing the cursor to a hand?

@kchibisov
Copy link
Member

On which platform do you see this? And do you use modifiers? In general, nothing stops us from doing so, but some platforms may disallow cursor change.

@nixpulvis
Copy link
Contributor Author

I'm on macOS at the moment. I don't have it setup to require modifiers for the URL clicks, but that's a good idea to mitigate my issue.

@chrisduerr
Copy link
Member

I think Alacritty might have actually done what you ask for in the past, but this was changed in winit a century ago iirc.

@kchibisov
Copy link
Member

The thing that was changed is click pass through, but there's an option for that on macOS. But on other platforms there's no such thing. Not sure why cursor isn't changing though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants