mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 08:47:47 +02:00
Another try at pointer frame support on Wayland
This time I think I got the wheel handling correct. At least works with my wheel mouse.
This commit is contained in:
27
glfw/wl_platform.h
vendored
27
glfw/wl_platform.h
vendored
@@ -146,6 +146,13 @@ enum WaylandWindowPendingState {
|
||||
PENDING_STATE_DECORATION = 2
|
||||
};
|
||||
|
||||
enum _GLFWWaylandAxisEvent {
|
||||
AXIS_EVENT_UNKNOWN = 0,
|
||||
AXIS_EVENT_CONTINUOUS = 1,
|
||||
AXIS_EVENT_DISCRETE = 2,
|
||||
AXIS_EVENT_VALUE120 = 3
|
||||
};
|
||||
|
||||
// Wayland-specific per-window data
|
||||
//
|
||||
typedef struct _GLFWwindowWayland
|
||||
@@ -178,6 +185,20 @@ typedef struct _GLFWwindowWayland
|
||||
struct zwlr_layer_surface_v1* zwlr_layer_surface_v1;
|
||||
} layer_shell;
|
||||
|
||||
/* information about axis events on current frame */
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
enum _GLFWWaylandAxisEvent x_axis_type;
|
||||
float x;
|
||||
enum _GLFWWaylandAxisEvent y_axis_type;
|
||||
float y;
|
||||
} discrete, continuous;
|
||||
|
||||
/* Event timestamp in nanoseconds */
|
||||
monotonic_t timestamp_ns;
|
||||
} pointer_curr_axis_info;
|
||||
|
||||
_GLFWcursor* currentCursor;
|
||||
double cursorPosX, cursorPosY, allCursorPosX, allCursorPosY;
|
||||
|
||||
@@ -255,12 +276,6 @@ typedef struct _GLFWwindowWayland
|
||||
|
||||
|
||||
bool maximize_on_first_show;
|
||||
// counters for ignoring axis events following axis_discrete events in the
|
||||
// same frame along the same axis
|
||||
struct {
|
||||
unsigned int x, y;
|
||||
} axis_discrete_count;
|
||||
|
||||
uint32_t pending_state;
|
||||
struct {
|
||||
int width, height;
|
||||
|
||||
Reference in New Issue
Block a user