Skip to content

Item slots do not start hovered on formspec creation/update if the cursor is on them #14530

@Wuzzy2

Description

@Wuzzy2

Minetest version

Minetest 5.8.0

Irrlicht device

X11

Operating system and version

GNU/Linux

CPU model

No response

GPU model

No response

Active renderer

OpenGL 4.5

Summary

If the formspec updates and the mouse initially points at a position where there is an item slot, item or tooltip, the item slot will not be hovered and the tooltip will not be shown until the mouse has been moved by at least 1 pixel.

This is most noticable in formspecs that regularily update themselves with only small changes, which causes the hover/tooltip display status to be reset.

The expected behavior is that item slots are instantly hovered and tooltips appear if the mouse happens to be in such a position right after the formspec appears, not just after the mouse was moved.

Steps to reproduce

This is best reproducible in furnace nodes in pretty much all games that have a furnace. Here are the steps for Minetest Game:

  1. Put coal in fuel slot
  2. Put iron ore in source slot
  3. Wait for iron to smelt
  4. Hover the steel ingot that was just created
  5. Wait more and do not touch the mouse; watch the status of the item slot hovering and tooltip

After the furnace burned down 1 step, the mouse no longer hovers the item slot and the tooltip disappears. You have to move the mouse by 1 pixel to make it appear again. The expected behavior is that the item slot is still hovered after the formspec update.

Note the MTG furnace updates itself every second while burning, I think this why it is happening.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions