macroquad icon indicating copy to clipboard operation
macroquad copied to clipboard

Touchscreen mouse emulation doesn't seem to work well on Linux

Open vpzomtrrfrt opened this issue 3 years ago • 1 comments

Observed under Arch Linux, Xorg, i3, on a ThinkPad Yoga 11e

I'm not sure how to tell if the touch events are even reaching macroquad or if some other layer is failing here.

Reproduction Steps

  • Run the rustaceanmark example
  • Click and drag on the screen

The rustaceans appear at the position of the cursor as it moves.

  • Touch and drag on the screen

The rustaceans appear only at the start point and continue to be added after letting up.

vpzomtrrfrt avatar Aug 07 '22 05:08 vpzomtrrfrt

The issue still persists and I think the culprit is here https://github.com/not-fl3/macroquad/blob/471f5b7b359ec71c89f97e765784b722fc87d4dc/src/lib.rs#L687 I'm not sure what exactly set_cursor_grab is doing, but that line is causing all the mouse_motion events and mouse_button_up event being ignored (but only for the mouse emulated by touchscreen). Commenting out that line seems to resolve the issue, but I don't know what other side effects it might have...

bolphen avatar Jun 23 '24 19:06 bolphen