Create a wxDisplay directly from wxWindow
This commit is contained in:
@@ -2285,9 +2285,6 @@ void wxComboCtrlBase::ShowPopup()
|
||||
|
||||
SetFocus();
|
||||
|
||||
int displayIdx = wxDisplay::GetFromWindow(this);
|
||||
wxRect displayRect = wxDisplay(displayIdx != wxNOT_FOUND ? displayIdx : 0u).GetGeometry();
|
||||
|
||||
// Space above and below
|
||||
int screenHeight;
|
||||
wxPoint scrPos;
|
||||
@@ -2296,6 +2293,7 @@ void wxComboCtrlBase::ShowPopup()
|
||||
int maxHeightPopup;
|
||||
wxSize ctrlSz = GetSize();
|
||||
|
||||
wxRect displayRect = wxDisplay(this).GetGeometry();
|
||||
screenHeight = displayRect.GetHeight();
|
||||
scrPos = GetScreenPosition();
|
||||
|
||||
|
@@ -1716,8 +1716,7 @@ wxPoint wxPropertyGrid::GetGoodEditorDialogPosition( wxPGProperty* p,
|
||||
|
||||
ImprovedClientToScreen( &x, &y );
|
||||
|
||||
int displayIdx = wxDisplay::GetFromWindow(this);
|
||||
wxRect displayRect = wxDisplay(displayIdx != wxNOT_FOUND ? displayIdx : 0u).GetGeometry();
|
||||
wxRect displayRect = wxDisplay(this).GetGeometry();
|
||||
|
||||
x -= displayRect.GetX();
|
||||
y -= displayRect.GetY();
|
||||
|
Reference in New Issue
Block a user