canonical / mir

The Mir compositor
GNU General Public License v2.0
637 stars 102 forks source link

[Mir-on-Wayland] Cursor not correct in multi-monitor #1376

Closed AlanGriffiths closed 4 years ago

AlanGriffiths commented 4 years ago

(Master, not release 1.7.1)

Looks as though we've lost the window offset recently.

WAYLAND_DISPLAY=wayland-99 miral-system-compositor --x11-output 640x480:640x480
WAYLAND_DISPLAY=wayland-88 miral-app --wayland-host wayland-99

Ctrl-Alt-T to launch a terminal

Try dragging from "output" to "output".

Expect: dragged smoothly Actual: window jumps as cursor crosses "output" to the corresponding place on the original output

(Both on 20.04 on ProX15 and X1C3)

AlanGriffiths commented 4 years ago

We're not sending the surface enter/leave events if the mouse button is pressed.

AlanGriffiths commented 4 years ago

We're not sending the surface enter/leave events if the mouse button is pressed.

Actually that isn't needed.

What's happening is that the host compositor has the windows "sidebyside" one way and the nested compositor has the windows "sidebyside" the opposite way.

So, when the cursor moves from one output to the other the position relative to the starting surface reported by the host isn't consistent with the movement in the nested.