Merge lp:~andreas-pokorny/mir/fix-1580774 into lp:mir
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Daniel van Vugt | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 3511 | ||||
Proposed branch: | lp:~andreas-pokorny/mir/fix-1580774 | ||||
Merge into: | lp:mir | ||||
Diff against target: |
182 lines (+146/-6) 2 files modified
src/server/scene/mediating_display_changer.cpp (+5/-6) tests/unit-tests/scene/test_mediating_display_changer.cpp (+141/-0) |
||||
To merge this branch: | bzr merge lp:~andreas-pokorny/mir/fix-1580774 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Abstain | ||
Cemil Azizoglu (community) | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Kevin DuBois (community) | Approve | ||
Andreas Pokorny (community) | Needs Information | ||
Review via email: mp+294729@code.launchpad.net |
Commit message
Use the connected status of the display output to configure pointer confinement
The virtual display is powered and available but not connected on startup, hence it would be accounted as reachable display area. And the mouse would be allowed to leave the first output, which leads to a termination of input events being sent to the nested session..
Description of the change
This is the hotfix that will probably be released within 0.22.1. and maybe also integrated into 0.23.
The virtual display is created 'on' has a valid mode but is not connected on startup. On M10 the screen is 1200x1920, and the virtual display is 1920x1080. As a result the allowed input area was calculated to be 1920x1920. In the coordinate system of usc, the surface of unity8 ends at x = 1200 moving beyond that point makes the cursor leave unity8. No more mouse events reach unity8. Unity8 maps that movement along the other axis, so there is a phantom border on the right that you cannot cross..
+ if (output.connected && output.power_mode == mir_power_mode_on &&
Should be just 'if (output.used &&'. Because we don't want to include unused but connected outputs, and we DO want to include used but sleeping outputs (they should turn on when the cursor moves anyway).