VirtualBox

Changes between Initial Version and Version 1 of Ticket #16089


Ignore:
Timestamp:
Oct 20, 2016 12:26:58 PM (8 years ago)
Author:
Frank Mehnert
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16089 – Description

    initial v1  
    33
    44The problem happens if the monitor order changes - for instance, suppose we have 2 monitors - 0 and 1.
    5 
     5{{{
    66---------- ---------
    7 |   0    | |   1  |
     7|   0    | |   1   |
    88---------- ---------
    9 
     9}}}
    1010Suppose monitor 0 is 1024x768 starting at 0,0 and monitor 1 is 800x600 starting at 1024,0.
    1111Suppose we call setvideomodehint with monitor 1 being moved to -1024,0 in order to move it to the left of monitor 0.
     
    1414The current code to check whether the monitors now intersect (post potential resize) is:
    1515(assume iRect=0 and iNextRect=1)
    16 
     16{{{
    1717int delta = paNewRects[iRect].right - paNewRects[iNextRect].left;
    18 
     18}}}
    1919this will result in 1024 (right of monitor 0) - -1024 (new left of monitor 1) = 2048.
    2020next,
    21 
     21{{{
    2222        if (delta != 0)
    2323        {
     
    2929            paNewRects[iNextRect].right += delta;
    3030        }
    31 
     31}}}
    3232since delta != 0, we will now move monitor 1 on the x axis by 2048, which will lead to monitor 1
    3333being in the exact same location before we tried to move it.

© 2023 Oracle
ContactPrivacy policyTerms of Use