Can't move virtual mouse to different display
I have a setup consisting of two displays labelled "D1" and "D2".
When attaching a physical mouse, classified as a Mouse
Mouse device: is tagged by udev as: Mouse
and place the cursor on the second screen (D2) and now move the cursor back to D1, everything
works as expected.
If I now to the same with a uinput virtual device also classified as a Mouse, the cursor get's stuck on 0x0 of the D2.
Extract from weston-debug proto | grep wl_pointer
for the physical mouse
[2024-02-29 10:58:10.793][proto] client 0xaaaadcfb6910 ev wl_pointer@20.motion(15068241, 4.101562, 56.011719)
[2024-02-29 10:58:10.793][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:58:10.801][proto] client 0xaaaadcfb6910 ev wl_pointer@20.motion(15068249, 2.007812, 58.105469)
[2024-02-29 10:58:10.801][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:58:10.809][proto] client 0xaaaadcfb6910 ev wl_pointer@20.leave(974, wl_surface@32)
[2024-02-29 10:58:10.809][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:58:10.809][proto] client 0xaaaadcac0d20 ev wl_pointer@21.enter(975, wl_surface@14, 1277.820312, 59.152344)
[2024-02-29 10:58:10.809][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068257, 1277.820312, 59.152344)
[2024-02-29 10:58:10.817][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068265, 1273.312500, 60.281250)
[2024-02-29 10:58:10.825][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068273, 1268.710938, 62.582031)
[2024-02-29 10:58:10.833][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068281, 1262.632812, 63.796875)
[2024-02-29 10:58:10.838][proto] client 0xaaaadcac0d20 rq wl_pointer@21.set_cursor(975, wl_surface@13, 1, 1)
[2024-02-29 10:58:10.841][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068289, 1254.656250, 65.125000)
[2024-02-29 10:58:10.849][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068297, 1252.363281, 65.125000)
[2024-02-29 10:58:10.857][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068305, 1245.542969, 65.125000)
[2024-02-29 10:58:10.865][proto] client 0xaaaadcac0d20 ev wl_pointer@21.motion(15068313, 1235.367188, 65.125000)
and for the virtual device
[2024-02-29 10:55:26.632][proto] client 0xaaaadcfb6910 ev wl_pointer@20.enter(928, wl_surface@31, 0.000000, 0.000000)
[2024-02-29 10:55:26.632][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:55:26.632][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:55:26.634][proto] client 0xaaaadcfb6910 rq wl_pointer@20.set_cursor(928, wl_surface@40, 1, 1)
[2024-02-29 10:55:26.732][proto] client 0xaaaadcfb6910 ev wl_pointer@20.leave(929, wl_surface@31)
[2024-02-29 10:55:26.732][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:55:26.732][proto] client 0xaaaadcfb6910 ev wl_pointer@20.enter(930, wl_surface@31, 0.000000, 0.000000)
[2024-02-29 10:55:26.732][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:55:26.732][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:55:26.734][proto] client 0xaaaadcfb6910 rq wl_pointer@20.set_cursor(930, wl_surface@23, 1, 1)
[2024-02-29 10:55:26.832][proto] client 0xaaaadcfb6910 ev wl_pointer@20.leave(931, wl_surface@31)
[2024-02-29 10:55:26.832][proto] client 0xaaaadcfb6910 ev wl_pointer@20.frame()
[2024-02-29 10:55:26.832][proto] client 0xaaaadcfb6910 ev wl_pointer@20.enter(932, wl_surface@31, 0.000000, 0.000000)
Is that a known behavior? Was there already a fix for that (I forced to use a weston 10.x branch for my test) I could backport?
Happy for some input
Reproduction
- run weston with two displays
- attach the physical mouse
- move the cursor to the 2nd screen
- try to iteratively move the cursor using a uinput virtual device (e.g. with the help of ydotool)
Expected behavior
- cursor can be move to the first screen
Actual behavior
- cursor get's stuck on 0x0 of the second screen