Mir

Cursor gets stranded and can't move between non-contiguous monitors (especially after rotation)

Bug #1313610 reported by Daniel van Vugt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Pocket Desktop
Incomplete
Medium
Unassigned
Mir
Triaged
Medium
Unassigned
mir (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

The cursor gets stranded and can't move to some monitors.

Test case:
  1. Get the latest Mir source (r1580 or later).
  2. Plug in two monitors.
  3. mir_demo_server_shell --display-config sidebyside
  4. Move the cursor to the left monitor.
  5. Rotate the monitor 90 degrees: Ctrl+Alt+Left/Right
  6. Move the cursor around the screen boundaries.

Expected: The cursor can always reach both monitors while they are on.
Observed: The cursor is stranded on the left (rotated) monitor and can't reach the right one.

The problem goes away if you rotate the monitor to normal (Ctrl+Alt+Up) or upside-down (Ctrl+Alt+Down).

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

I am not able to reproduce locally (laptop screen + external monitor, mir_server_shell --display-config=sidebyside)

Which mir server are you running and with what display configuration (clone,sidebyside etc).

Does this happen randomly or when you change to a particular set of configurations?

Changed in mir:
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Tested again. Updated the bug description with a test case.

description: updated
Changed in mir:
status: Incomplete → Triaged
tags: added: cursor multimonitor
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think it's that rotating the left monitor makes it narrower. So its right edge no longer touches the right monitor. They're not joined in screen space any more as a single region, but two separate regions. And the mouse cursor logic can't/won't warp between multiple regions.

We could go to the trouble of making such a display config impossible, but it's probably more sensible to just ensure the mouse can move freely even in regions not covered by any monitor (to the extent of the bounding box of all monitors at least).

tags: added: rotation
summary: - Hardware cursor gets stranded and can't move to some monitors
+ Hardware cursor gets stranded and can't move between non-contiguous
+ monitors
summary: Hardware cursor gets stranded and can't move between non-contiguous
- monitors
+ monitors (especially after rotation)
summary: - Hardware cursor gets stranded and can't move between non-contiguous
- monitors (especially after rotation)
+ Cursor gets stranded and can't move between non-contiguous monitors
+ (especially after rotation)
description: updated
Revision history for this message
kevin gunn (kgunn72) wrote :

Adding info that we see this when connecting a monitor to the Nexus4 during windowed mode, the device is put into landscape mode. the mouse motion appears to not have followed the orientation and is bounded by roughly portrait width instead of landscape width

tags: added: pd
Changed in qtmir (Ubuntu):
status: New → Opinion
kevin gunn (kgunn72)
no longer affects: qtmir (Ubuntu)
kevin gunn (kgunn72)
Changed in mir:
importance: High → Medium
Changed in canonical-pocket-desktop:
importance: Undecided → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug does not apply to Unity8 right now. This bug is just for shells that use the Mir/hardware cursor logic. Whereas Unity8 does its own cursor movement logic.

For Unity8 see bug 1488417 instead.

Changed in canonical-pocket-desktop:
status: New → Incomplete
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

1. We allow non-contiguous screen layouts.
2. Even with contiguous screen layouts the bounding rectangle of the outputs can contain areas that are not on any output.

On the Unity7 desktop the cursor appears to be restricted to the bounding rectangle. (But it can be confusing if it moves off all monitors.)

I suspect that if we simply ensured that the screen layout is contiguous then we would have reasonable behaviour.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yeah I mentioned that in comment #3 but I don't think disallowing non-contiguous configs is the solution. That's an OK thing to do, but not a robust solution.

A robust solution would be to just let the cursor move freely within the bounding rectangle, and not care if any part of that is not covered by a monitor.

Doing that would solve this bug, and also solve the confusion that can arise from odd non-rectangular configs where you have to move the cursor through a narrow passage (smaller monitor) before it can find its way to the larger monitor. So keeping the cursor always on a screen can actually be more frustrating and awkward than allowing the edge cases where it might be invisible.

Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.