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

Inventory items unresponsive after tab interaction until LMB click on formspec #14250

Open
zmv7 opened this issue Jan 12, 2024 · 5 comments · May be fixed by #14661
Open

Inventory items unresponsive after tab interaction until LMB click on formspec #14250

zmv7 opened this issue Jan 12, 2024 · 5 comments · May be fixed by #14661
Labels
Bug Issues that were confirmed to be a bug @ Client / Controls / Input Formspec Regression Something that used to work no longer does.
Milestone

Comments

@zmv7
Copy link
Contributor

zmv7 commented Jan 12, 2024

Minetest version

Minetest 5.8.0 (Linux)
Using Irrlicht 1.9.0mt13
Using LuaJIT 2.1.1702233742
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="/usr/local/share/minetest"
STATIC_LOCALEDIR="/usr/local/share/locale"

Active renderer

OpenGL 4.6

Irrlicht device

X11

Operating system and version

Archlinux current

CPU model

AMD Ryzen 5 5600

GPU model

AMD Radeon RX 570 4GB

OpenGL version

4.6

Summary

After interacting with tabheader(switching tab or even clicking on current tab), you can't interact with inventory items until you click LMB anywhere on the formspec(except tabheader).
Video with mouse events overlay provided
TabheaderBug.webm

Steps to reproduce

  1. Open the formspec that contains list[] and tabheader[] elements (e.g. sfinv).
  2. Make sure you have some item(s) in the inventory
  3. Click on the current tab of the tabheader(or switch to another then go back to inventory tab)
  4. Try to pick up item using mouse wheel or RMB. - the items won't pick up
  5. Click LMB anywhere on the current formspec page(except tabs)
  6. Repeat step 4 - now items will pick up/move
@zmv7 zmv7 added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Jan 12, 2024
@zmv7
Copy link
Contributor Author

zmv7 commented Jan 12, 2024

Same issue on 5.9.0-dev-025516a with SDL Irrlicht device

@jeremyshannon
Copy link
Contributor

So that's what that is! I've noticed trouble with picking things up sometimes in 5.8.0. Exile uses tabs all over the place, and yes, when I've clicked a tab, I can't interact with anything until I've clicked the formspec again first.

@zmv7
Copy link
Contributor Author

zmv7 commented Jan 13, 2024

I assume the issue came together with android controls change

@sfan5 sfan5 added the Regression Something that used to work no longer does. label Jan 13, 2024
@Zughy Zughy added Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Jan 13, 2024
@Zughy Zughy added this to the 5.9.0 milestone Jan 13, 2024
@grorp
Copy link
Member

grorp commented Jan 27, 2024

I did a quick text and confirmed that this regression was introduced by 252c79d / #13146.

@OgelGames do you have an idea for a fix?

@j-r
Copy link

j-r commented Feb 24, 2024

The problem is that the tab interaction eats the up event (for the tab switching itself) so GUIFormSpecMenu:OnEvent never sees it and thinks the button is still down (m_held_mouse_button remains set), effectively ignoring the following button down events until the next up event resynchronizes the internal state to reality.

One could relax the m_held_mouse_button != BET_OTHER condition a bit to allow processing down events of the allegedly held button (indicating that the up event somehow got lost), or prevent the up even from getting lost, or never even set m_held_mouse_button in the !s.valid() cases at all, or something else:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Client / Controls / Input Formspec Regression Something that used to work no longer does.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants