mirror of
https://github.com/glfw/glfw.git
synced 2025-08-16 11:42:13 +00:00
Wayland: Move fallback decoration struct member
The cursorPreviousName member was only used for the fallback decorations but was not grouped with other related members.
This commit is contained in:
parent
ddbb8e0f2c
commit
5190a30d8a
@ -414,6 +414,7 @@ typedef struct _GLFWwindowWayland
|
||||
_GLFWfallbackEdgeWayland top, left, right, bottom;
|
||||
struct wl_surface* focus;
|
||||
wl_fixed_t pointerX, pointerY;
|
||||
const char* cursorName;
|
||||
} fallback;
|
||||
} _GLFWwindowWayland;
|
||||
|
||||
@ -455,7 +456,6 @@ typedef struct _GLFWlibraryWayland
|
||||
struct wl_cursor_theme* cursorTheme;
|
||||
struct wl_cursor_theme* cursorThemeHiDPI;
|
||||
struct wl_surface* cursorSurface;
|
||||
const char* cursorPreviousName;
|
||||
int cursorTimerfd;
|
||||
uint32_t serial;
|
||||
uint32_t pointerEnterSerial;
|
||||
|
@ -1417,7 +1417,6 @@ static void pointerHandleLeave(void* userData,
|
||||
|
||||
_glfw.wl.serial = serial;
|
||||
_glfw.wl.pointerFocus = NULL;
|
||||
_glfw.wl.cursorPreviousName = NULL;
|
||||
|
||||
if (window->wl.hovered)
|
||||
{
|
||||
@ -1427,7 +1426,10 @@ static void pointerHandleLeave(void* userData,
|
||||
else
|
||||
{
|
||||
if (window->wl.fallback.decorations)
|
||||
{
|
||||
window->wl.fallback.focus = NULL;
|
||||
window->wl.fallback.cursorName = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1451,7 +1453,6 @@ static void pointerHandleMotion(void* userData,
|
||||
{
|
||||
window->wl.cursorPosX = xpos;
|
||||
window->wl.cursorPosY = ypos;
|
||||
_glfw.wl.cursorPreviousName = NULL;
|
||||
_glfwInputCursorPos(window, xpos, ypos);
|
||||
return;
|
||||
}
|
||||
@ -1495,7 +1496,7 @@ static void pointerHandleMotion(void* userData,
|
||||
}
|
||||
}
|
||||
|
||||
if (_glfw.wl.cursorPreviousName != cursorName)
|
||||
if (window->wl.fallback.cursorName != cursorName)
|
||||
{
|
||||
struct wl_surface* surface = _glfw.wl.cursorSurface;
|
||||
struct wl_cursor_theme* theme = _glfw.wl.cursorTheme;
|
||||
@ -1531,7 +1532,7 @@ static void pointerHandleMotion(void* userData,
|
||||
wl_surface_damage(surface, 0, 0, image->width, image->height);
|
||||
wl_surface_commit(surface);
|
||||
|
||||
_glfw.wl.cursorPreviousName = cursorName;
|
||||
window->wl.fallback.cursorName = cursorName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user