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

Mouse cursor disappears when leaving slider input in inspector after edition #66909

Closed
Cevantime opened this issue Oct 4, 2022 · 10 comments
Closed

Comments

@Cevantime
Copy link
Contributor

Cevantime commented Oct 4, 2022

Godot version

4.0.beta2.mono.official (commit f8745f2)

System information

Linux Mint, Vulkan, Nvidia Geforce GTX 1660 Ti, nvidia-driver-515.65.01

Issue description

When I edit a slider value (float or integer) in the inspector and leave the mouse, the cursor disappears often (~80% of the times). After switching to another application, the cursor is back and I can move back to Godot and use the mouse again. Moving
the cursor inside the selected input also changes the input value :
bug

Note that this also happens when I move the cursor back into the input while it has been edited and is still selected.

Steps to reproduce

Open any project. Try to change the value of a slider value in the inspector (float or int) and move the cursor inside the selected input. It should disappear quite often (roughly 80% of the time)

Minimal reproduction project

No reproduction project is needed, since I can reproduce in any project on my system.

@Calinou Calinou changed the title Cursor disappearing when leaving slider input in inspector after edition Mouse cursor disappears when leaving slider input in inspector after edition Oct 4, 2022
@Calinou
Copy link
Member

Calinou commented Oct 4, 2022

Can you reproduce this after enabling Single Window Mode in the Editor Settings then restarting the editor?

@Cevantime
Copy link
Contributor Author

Hello, I confirm I can reproduce it in single window mode.

@Sauermann
Copy link
Contributor

For me on Debian Linux with Xfce window manager I can not reproduce this issue with non-mono Godot
When I follow your instructions, my mouse cursor changes its form to the "Text"-mouse cursor:

MouseCursorTest.mp4

Which window manager do you use?

In your video it looks like the mouse button gets pressed, which explains the vanishing mouse cursor and the value-change and afterwards gets into an inconsistent state (mouse is not pressed, but application assumes, that it is).

@salamandars
Copy link

Are you using a laptop trackpad? I can reproduce this on windows but only by double-tapping inside the trackpad. Regular mouse interactions work normally.

@Cevantime
Copy link
Contributor Author

Cevantime commented Oct 7, 2022

@salamandars
Yes, I am ! And yes, I'm double clicking inside the box.
@Sauermann, I'm using Cinnamon. Maybe I haven't been clear enough. To reproduce, you have to edit the value, then press enter to validate, and only then try to move the cursor.
But as @salamandars says, it might be linked to trackpads.

@salamandars
Copy link

Here's what I think is happening. A common way to click on (at least some) trackpads is to do a quick double-tap inside the touch area. Technically this actually registers as a double-click, at least in godot.

So when I do this on a spinbox, it seems to fire off 4 mouse button events:

  1. "Left mouse button Pressed" -> received by EditorSpinSlider
  2. "Left mouse button Not Pressed" -> received by EditorSpinSlider
  3. "Left mouse button Pressed (Double click)" - almost the exact same time as 2. -> received by EditorSpinSlider
    3.5. usually mouse motion event occurs here due to nature of tapping
  4. "Left mouse button Not Pressed" -> received by LineEdit

Guesswork: The first two events work correctly to put the LineEdit into input mode... but perhaps because the second click comes at the same time, it seems to also fire off before(?) the deferred call to switch focus to the line edit. So the second mouse DOWN event is received by the EditorSpinSlider, and (with a bit of accidental mouse motion) it also triggers the grabbing_spinner mouse capture behavior. However the second UP event is received by the LineEdit object instead, so the mouse is never released.

Perhaps a fix for this would be to move the mouse capturing behavior to Viewport so that it can keep track of mouse events better?

@mastir
Copy link

mastir commented Nov 14, 2022

Hey @salamandars, i have same bug on ubuntu 22.04 without touchpad. And even without click event. Just click on input, write some number and press enter. After any move mouse starts altering already inactive input without cursor v4.0-beta4_linux.x86_64 without mono. I guess your commit can fix this, thanks!

@snougo
Copy link

snougo commented Nov 25, 2022

I tested in Godot4 beta6 on Mac and mouse cursor only disappears when using mouse (or trackpad) draging to change inspector value

Screen.Recording.2022-11-25.at.4.23.25.PM.mov

@akien-mga
Copy link
Member

Yeah this was fixed a while ago. The behavior described by @snougo is the intended behavior.

@PIZZA-ALERT
Copy link

Similar but different issue happening to me and some others online. Mouse cursor straight up hidden every time it's hovered over text input.
#93748

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

Successfully merging a pull request may close this issue.

9 participants