mirror of
https://github.com/glfw/glfw.git
synced 2025-08-21 14:12:13 +00:00
Wayland: Fix cursor position after a modal
If a modal surface like the window menu was active, clicking on the GLFW window content area to close it would correctly emit the cursor enter event but would not propagate the cursor position from the event.
This commit is contained in:
parent
3cf9f6726d
commit
7ef6efeb66
@ -142,6 +142,8 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: Fallback decorations would show menu at wrong position
|
- [Wayland] Bugfix: Fallback decorations would show menu at wrong position
|
||||||
- [Wayland] Bugfix: The cursor was not updated when clicking through from
|
- [Wayland] Bugfix: The cursor was not updated when clicking through from
|
||||||
a modal to a fallback decoration
|
a modal to a fallback decoration
|
||||||
|
- [Wayland] Bugfix: The cursor position was not updated when clicking through
|
||||||
|
from a modal to the content area
|
||||||
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
||||||
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
||||||
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
||||||
|
@ -1538,6 +1538,13 @@ static void pointerHandleEnter(void* userData,
|
|||||||
window->wl.hovered = GLFW_TRUE;
|
window->wl.hovered = GLFW_TRUE;
|
||||||
_glfwSetCursorWayland(window, window->wl.currentCursor);
|
_glfwSetCursorWayland(window, window->wl.currentCursor);
|
||||||
_glfwInputCursorEnter(window, GLFW_TRUE);
|
_glfwInputCursorEnter(window, GLFW_TRUE);
|
||||||
|
|
||||||
|
if (window->cursorMode != GLFW_CURSOR_DISABLED)
|
||||||
|
{
|
||||||
|
window->wl.cursorPosX = wl_fixed_to_double(sx);
|
||||||
|
window->wl.cursorPosY = wl_fixed_to_double(sy);
|
||||||
|
_glfwInputCursorPos(window, window->wl.cursorPosX, window->wl.cursorPosY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user