correct the tests for the window position to actually the display offset into account (#10462)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -159,7 +159,7 @@ void wxPopupWindowBase::Position(const wxPoint& ptOrigin,
|
|||||||
// is there enough space to put the popup below the window (where we put it
|
// is there enough space to put the popup below the window (where we put it
|
||||||
// by default)?
|
// by default)?
|
||||||
wxCoord y = ptOrigin.y + size.y;
|
wxCoord y = ptOrigin.y + size.y;
|
||||||
if ( y + sizeSelf.y > sizeScreen.y )
|
if ( y + sizeSelf.y > posScreen.y + sizeScreen.y )
|
||||||
{
|
{
|
||||||
// check if there is enough space above
|
// check if there is enough space above
|
||||||
if ( ptOrigin.y > sizeSelf.y )
|
if ( ptOrigin.y > sizeSelf.y )
|
||||||
@@ -183,7 +183,7 @@ void wxPopupWindowBase::Position(const wxPoint& ptOrigin,
|
|||||||
x += size.x;
|
x += size.x;
|
||||||
|
|
||||||
|
|
||||||
if ( x + sizeSelf.x > sizeScreen.x )
|
if ( x + sizeSelf.x > posScreen.x + sizeScreen.x )
|
||||||
{
|
{
|
||||||
// check if there is enough space to the left
|
// check if there is enough space to the left
|
||||||
if ( ptOrigin.x > sizeSelf.x )
|
if ( ptOrigin.x > sizeSelf.x )
|
||||||
|
Reference in New Issue
Block a user