Skip to content

Conversation

scorpion-26
Copy link
Contributor

This PR does 2 things:

  1. Reverts Fix GLFW_CURSOR_DISABLED being ignored when updating cursor position #5625
  2. Implements Fix GLFW_CURSOR_DISABLED being ignored when updating cursor position #5625 properly

By setting an analogous backend flag to ImGuiConfigFlag_NoMouse when GLFW_CURSOR_DISABLED is set, ImGui won't hover items with the virtual cursor, while also providing up-to-date cursor positions (#5625 (comment)).
I opted to add a backend flag instead of just using ImGuiConfigFlag_NoMouse to avoid interfering with the user setting this flag (See also the commit message for da049f3). A version that just uses ImGuiConfigFlag_NoMouse can be found at the commit c7013bd though.

scorpion-26 and others added 3 commits July 16, 2023 20:07
GLFW_CURSOR_DISABLED now causes ImGuiConfigFlags_NoMouse to be set
automatically, which disables any mouse interactions with the UI, but
still updates the mouse position internally
This is done so we don't interfere with the user setting ImGuiConfigFlags_NoMousewhile the cursor is disabled (This would previously cause automatic clearing, even though the user set NoMouse manually).
@ocornut
Copy link
Owner

ocornut commented Jul 18, 2023

Merged revert only (e5977f0), let's move this discussion to #5625

@ocornut ocornut closed this Jul 18, 2023
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.

2 participants