mirror of
https://github.com/glfw/glfw.git
synced 2025-12-21 14:42:06 +00:00
Compare commits
4 Commits
3140921827
...
edb9c0c153
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edb9c0c153 | ||
|
|
0d2d85d19c | ||
|
|
768e81a0eb | ||
|
|
7ca8474604 |
@ -68,6 +68,7 @@ video tutorials.
|
||||
- Jan Ekström
|
||||
- Siavash Eliasi
|
||||
- er-azh
|
||||
- Jan Hendrik Farr
|
||||
- Ahmad Fatoum
|
||||
- Nikita Fediuchin
|
||||
- Felipe Ferreira
|
||||
|
||||
@ -138,6 +138,7 @@ information on what to include when reporting a bug.
|
||||
- [Wayland] Bugfix: Retrieved cursor position would be incorrect when hovering over
|
||||
fallback decorations
|
||||
- [Wayland] Bugfix: Fallback decorations would report scroll events
|
||||
- [Wayland] Bugfix: Keyboard repeat events halted when any key is released (#2568)
|
||||
- [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 EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
||||
|
||||
@ -135,7 +135,7 @@ static void registryHandleGlobal(void* userData,
|
||||
{
|
||||
_glfw.wl.seat =
|
||||
wl_registry_bind(registry, name, &wl_seat_interface,
|
||||
_glfw_min(4, version));
|
||||
_glfw_min(5, version));
|
||||
_glfwAddSeatListenerWayland(_glfw.wl.seat);
|
||||
|
||||
if (wl_seat_get_version(_glfw.wl.seat) >=
|
||||
|
||||
@ -1646,6 +1646,31 @@ static void pointerHandleAxis(void* userData,
|
||||
}
|
||||
}
|
||||
|
||||
static void pointerHandleFrame(void* userData,
|
||||
struct wl_pointer* pointer)
|
||||
{
|
||||
}
|
||||
|
||||
static void pointerHandleAxisSource(void* userData,
|
||||
struct wl_pointer* pointer,
|
||||
uint32_t axis_source)
|
||||
{
|
||||
}
|
||||
|
||||
static void pointerHandleAxisStop(void* userData,
|
||||
struct wl_pointer* pointer,
|
||||
uint32_t time,
|
||||
uint32_t axis)
|
||||
{
|
||||
}
|
||||
|
||||
static void pointerHandleAxisDiscrete(void* userData,
|
||||
struct wl_pointer* pointer,
|
||||
uint32_t axis,
|
||||
int32_t discrete)
|
||||
{
|
||||
}
|
||||
|
||||
static const struct wl_pointer_listener pointerListener =
|
||||
{
|
||||
pointerHandleEnter,
|
||||
@ -1653,6 +1678,10 @@ static const struct wl_pointer_listener pointerListener =
|
||||
pointerHandleMotion,
|
||||
pointerHandleButton,
|
||||
pointerHandleAxis,
|
||||
pointerHandleFrame,
|
||||
pointerHandleAxisSource,
|
||||
pointerHandleAxisStop,
|
||||
pointerHandleAxisDiscrete,
|
||||
};
|
||||
|
||||
static void keyboardHandleKeymap(void* userData,
|
||||
@ -1778,24 +1807,6 @@ static void keyboardHandleLeave(void* userData,
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
// Handle any key repeats up to this point. We don't poll as this should be infrequent.
|
||||
uint64_t repeats;
|
||||
if (read(_glfw.wl.keyRepeatTimerfd, &repeats, sizeof(repeats)) == 8)
|
||||
{
|
||||
if(_glfw.wl.keyboardFocus)
|
||||
{
|
||||
for (uint64_t i = 0; i < repeats; i++)
|
||||
{
|
||||
_glfwInputKey(_glfw.wl.keyboardFocus,
|
||||
translateKey(_glfw.wl.keyRepeatScancode),
|
||||
_glfw.wl.keyRepeatScancode,
|
||||
GLFW_PRESS,
|
||||
_glfw.wl.xkb.modifiers);
|
||||
inputText(_glfw.wl.keyboardFocus, _glfw.wl.keyRepeatScancode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct itimerspec timer = {0};
|
||||
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
||||
|
||||
@ -1838,10 +1849,11 @@ static void keyboardHandleKey(void* userData,
|
||||
|
||||
timer.it_value.tv_sec = _glfw.wl.keyRepeatDelay / 1000;
|
||||
timer.it_value.tv_nsec = (_glfw.wl.keyRepeatDelay % 1000) * 1000000;
|
||||
}
|
||||
}
|
||||
|
||||
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
||||
}
|
||||
} else if (scancode == _glfw.wl.keyRepeatScancode) {
|
||||
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
||||
}
|
||||
|
||||
_glfwInputKey(window, key, scancode, action, _glfw.wl.xkb.modifiers);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user