Changes between Initial Version and Version 1 of Ticket #16089
- Timestamp:
- Oct 20, 2016 12:26:58 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16089 – Description
initial v1 3 3 4 4 The problem happens if the monitor order changes - for instance, suppose we have 2 monitors - 0 and 1. 5 5 {{{ 6 6 ---------- --------- 7 | 0 | | 1 |7 | 0 | | 1 | 8 8 ---------- --------- 9 9 }}} 10 10 Suppose monitor 0 is 1024x768 starting at 0,0 and monitor 1 is 800x600 starting at 1024,0. 11 11 Suppose we call setvideomodehint with monitor 1 being moved to -1024,0 in order to move it to the left of monitor 0. … … 14 14 The current code to check whether the monitors now intersect (post potential resize) is: 15 15 (assume iRect=0 and iNextRect=1) 16 16 {{{ 17 17 int delta = paNewRects[iRect].right - paNewRects[iNextRect].left; 18 18 }}} 19 19 this will result in 1024 (right of monitor 0) - -1024 (new left of monitor 1) = 2048. 20 20 next, 21 21 {{{ 22 22 if (delta != 0) 23 23 { … … 29 29 paNewRects[iNextRect].right += delta; 30 30 } 31 31 }}} 32 32 since delta != 0, we will now move monitor 1 on the x axis by 2048, which will lead to monitor 1 33 33 being in the exact same location before we tried to move it.