diff --git a/src/msw/nonownedwnd.cpp b/src/msw/nonownedwnd.cpp index 635858876e..43b9d7d7d7 100644 --- a/src/msw/nonownedwnd.cpp +++ b/src/msw/nonownedwnd.cpp @@ -34,7 +34,6 @@ #include "wx/graphics.h" #endif // wxUSE_GRAPHICS_CONTEXT -#include "wx/display.h" #include "wx/dynlib.h" #include "wx/msw/missing.h" #include "wx/msw/private/darkmode.h" @@ -339,14 +338,6 @@ bool wxNonOwnedWindow::HandleDPIChange(const wxSize& newDPI, const wxRect& newRe // which it might have been just moved to this one, as doing this // would result in an infinite stream of WM_DPICHANGED messages. actualNewRect.Inflate(diff / 2); - - // However still ensure that the window origin is visible on its - // display, we don't move to move it out of visible space. - const wxRect screenRect = wxDisplay(this).GetClientArea(); - if ( actualNewRect.x < screenRect.x ) - actualNewRect.x = screenRect.x; - if ( actualNewRect.y < screenRect.y ) - actualNewRect.y = screenRect.y; } SetSize(actualNewRect);