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

Stop color picker tooltip from stealing input events #92843

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

anniryynanen
Copy link
Contributor

Input events go to the tooltip because it's added to popup_list in DisplayServer popup_open. I think there's no harm in tooltips being omitted from the list, so this commit blocks non-popup windows from being added if they have FLAG_NO_FOCUS and FLAG_MOUSE_PASSTHROUGH.

I'm not happy with this way of detecting tooltips. It'll also catch other windows where this behavior may or may not be wanted.

I thought about adding FLAG_TOOLTIP, but went with the smaller change for now.

Fixes #79500.

I don't have access to macOS so this has only been tested in Linux and Windows.

Input events go to the tooltip because it's added to `popup_list` in
DisplayServer `popup_open`. I think there's no harm in tooltips being omitted
from the list, so this commit blocks non-popup windows from being added if they
have `FLAG_NO_FOCUS` and `FLAG_MOUSE_PASSTHROUGH`.

I'm not happy with this way of detecting tooltips. It'll also catch other
windows where this behavior may or may not be wanted.

I thought about adding `FLAG_TOOLTIP`, but went with the smaller change for
now.

Fixes godotengine#79500.
@JekSun97
Copy link

JekSun97 commented Jun 6, 2024

I apologize for being off topic, but it seems to me that this problem is also stealing focus (#88412 ), I am not imposing the problem on you, but maybe you should take a look at the problem :)

@anniryynanen
Copy link
Contributor Author

anniryynanen commented Jun 7, 2024

I'm sorry, but I need personal pain to motivate myself to work with C++. ^^;; Maybe if I get into UV editing in the future.

@passivestar
Copy link
Contributor

I don't have access to macOS so this has only been tested in Linux and Windows.

works on macOS

@bruvzg
Copy link
Member

bruvzg commented Jun 8, 2024

I thought about adding FLAG_TOOLTIP, but went with the smaller change for now.

This might be a good idea, but current changes should work fine for tooltip.

@akien-mga akien-mga merged commit b80e591 into godotengine:master Jun 10, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@anniryynanen anniryynanen deleted the tooltip-in-popup branch June 10, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor: Colour picker's hex LineEdit input's tooltip steals focus
6 participants