Fix wxOverlay when used with a TLW under wxMSW

Correctly position the overlay window over the TLW's client area.
This commit is contained in:
AliKet 2024-02-09 21:17:24 +01:00
parent c0140d12c9
commit e79466f02b

View file

@ -99,8 +99,9 @@ void wxOverlayImpl::Init(wxDC* dc, int , int , int , int )
m_window = dc->GetWindow();
m_rect.SetSize(m_window->GetClientSize());
m_rect.SetPosition(m_window->GetScreenPosition());
// The rectangle must be in screen coordinates
m_rect = m_window->GetClientRect();
m_window->ClientToScreen(&m_rect.x, &m_rect.y);
m_bitmap.CreateWithLogicalSize(m_rect.GetSize(), m_window->GetDPIScaleFactor());