mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 00:30:57 +00:00
Wayland: Add support for pointer event frames
This adds support for wl_seat version 5, which adds pointer frames. This allows two-dimensional scroll input to be emitted as single events instead of one event per axis per motion. It's also the the foundation for future enhancements like properly scaled discrete scroll events and server-side key repeat. Fixes #2494
This commit is contained in:
+13
-1
@@ -414,7 +414,8 @@ typedef struct _GLFWwindowWayland
|
||||
GLFWbool decorations;
|
||||
struct wl_buffer* buffer;
|
||||
_GLFWfallbackEdgeWayland top, left, right, bottom;
|
||||
wl_fixed_t pointerX, pointerY;
|
||||
double pointerX, pointerY;
|
||||
uint32_t buttonPressSerial;
|
||||
const char* cursorName;
|
||||
} fallback;
|
||||
} _GLFWwindowWayland;
|
||||
@@ -472,6 +473,17 @@ typedef struct _GLFWlibraryWayland
|
||||
short int scancodes[GLFW_KEY_LAST + 1];
|
||||
char keynames[GLFW_KEY_LAST + 1][5];
|
||||
|
||||
struct {
|
||||
struct wl_surface* pointerSurface;
|
||||
unsigned int events;
|
||||
double pointerX;
|
||||
double pointerY;
|
||||
double scrollX;
|
||||
double scrollY;
|
||||
int button;
|
||||
int action;
|
||||
} pending;
|
||||
|
||||
struct {
|
||||
void* handle;
|
||||
struct xkb_context* context;
|
||||
|
||||
Reference in New Issue
Block a user