fix: don't render for all plain mouse move events

This commit is contained in:
CJ van den Berg 2026-01-15 15:16:38 +01:00
parent 7c19236fa6
commit ba86f34669
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -718,7 +718,8 @@ fn dispatch_mouse(ctx: *anyopaque, y: c_int, x: c_int, cbor_msg: []const u8) voi
self.update_mouse_idle_timer();
const m: tp.message = .{ .buf = cbor_msg };
const from = tp.self_pid();
self.unrendered_input_events_count += 1;
if (!(m.match(.{ "M", tp.more }) catch false))
self.unrendered_input_events_count += 1;
const send_func = if (self.drag_source) |_| &send_mouse_drag else &send_mouse;
send_func(self, y, x, from, m) catch |e| self.logger.err("dispatch mouse", e);
var btn: input.MouseType = 0;