VirtualBox

Changeset 75961 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Dec 5, 2018 9:34:44 AM (6 years ago)
Author:
vboxsync
Message:

Additions/VBoxClient/svga: provide default screen layout information.
bugref:9170: Implement support for multihead display configurations in VMSVGA device.
When a multi-monitor guest is in use, the host and the guest have to agree
about how the pointer input device maps to screen layouts in order for input
to be properly usable. So if the host does not actively request a particular
screen layout we assume screens laid out horizontally starting at zero, which
matches the host default. I am not sure if the host code will correctly
inform the host input device code if it requests another layout, but if it
does not this works. And if the guest ignores the host request, e.g. if the
user asked the guest control panel for a different layout, then the input
mapping will break, but this is possibly a guest bug, as it breaks other
virtualisers too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga.cpp

    r70126 r75961  
    232232            if (afEnabled[i])
    233233            {
    234                 aRects[cHeads].x = (int32_t)adx[i];
    235                 aRects[cHeads].y = (int32_t)ady[i];
     234                if ((i == 0) || (adx[i] || ady[i]))
     235                {
     236                    aRects[cHeads].x = (int32_t)adx[i];
     237                    aRects[cHeads].y = (int32_t)ady[i];
     238                } else {
     239                    aRects[cHeads].x = (int32_t)(adx[i - 1] + acx[i - 1]);
     240                    aRects[cHeads].y = (int32_t)ady[i - 1];
     241                }
    236242                aRects[cHeads].w = acx[i];
    237243                aRects[cHeads].h = acy[i];
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette