gimp but for windows: a wayland compositor
git clone https://github.com/m-col/wimp
Files | Refs | Readme

Commit bd483b7e9267edcbb8ce0f73d5717d4aed82cc13
Parent: 2a74e038048162fbc53dcb6990fb62be1e8330d8
Author: mcol <mcol@posteo.net>
Date: 2021-03-01 15:23:01 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-03-01 15:23:01 +0000

feed absolute cursor movements (with X backend) into relative movement code

src/cursor.c Modified

@@ -395,8 +395,17 @@
 
 static void on_cursor_motion_absolute(struct wl_listener *listener, void *data) {
     struct wlr_event_pointer_motion_absolute *event = data;
-    wlr_cursor_warp_absolute(wimp.cursor, event->device, event->x, event->y);
-    process_cursor_motion(event->time_msec, 0, 0);
+    double lx, ly;
+    wlr_cursor_absolute_to_layout_coords(
+	wimp.cursor, event->device, event->x, event->y, &lx, &ly
+    );
+
+    struct wlr_event_pointer_motion relative = {
+	.device = event->device,
+	.delta_x = lx - wimp.cursor->x,
+	.delta_y = ly - wimp.cursor->y,
+    };
+    on_cursor_motion(NULL, &relative);
 }