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

Handle first click on Zed window #9553

Merged
merged 11 commits into from
Mar 25, 2024

Conversation

danielzsh
Copy link
Contributor

@danielzsh danielzsh commented Mar 20, 2024

Fixes #4336

Release Notes:

  • Zed now responds to the first, focusing, click on the application window.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 20, 2024
@danielzsh
Copy link
Contributor Author

danielzsh commented Mar 20, 2024

@mikayla-maki I refactored the first_mouse handling into MouseDownEvent, what do you think?

@mikayla-maki
Copy link
Contributor

This came out pretty nice! Let me test drive this a bit tomorrow and see how it feels.

@mikayla-maki mikayla-maki self-assigned this Mar 20, 2024
@mikayla-maki
Copy link
Contributor

Gave this a test drive, it seems like this has caused a pretty nasty bug where first clicks are treated like a drag event. In this example video, I only click on the terminal-editor border, and I only click on the assets folder, but both cause dragging behavior.

BugExample.mov

@danielzsh
Copy link
Contributor Author

Oh yikes, I only tested double clicking the files; thanks for the catch!

@mikayla-maki mikayla-maki marked this pull request as draft March 21, 2024 22:26
@danielzsh danielzsh marked this pull request as ready for review March 21, 2024 22:42
@mikayla-maki
Copy link
Contributor

This works great, thank you!

@mikayla-maki mikayla-maki merged commit 569a723 into zed-industries:main Mar 25, 2024
8 checks passed
@mikayla-maki
Copy link
Contributor

A good follow up for this PR might be making non-focused hovers work. I noticed that firefox does do a little styling of non-focused tabs you hover over, and I think that would be good behavior for things like the status bar buttons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus editor component under cursor instead of last active component
2 participants