From a24d58a6d32ecc6bec04984c8a9ffc82d4d0db9c Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sat, 28 Sep 2019 23:02:12 +0200 Subject: [PATCH] Use wxWindow instead of wxDisplay for wxGraphicsContext::GetDPI --- src/common/graphcmn.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 99f1e81532..540dc4042e 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -29,10 +29,9 @@ #include "wx/pen.h" #include "wx/region.h" #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/display.h" - #ifdef __WXMSW__ #include "wx/msw/enhmeta.h" #endif @@ -624,7 +623,7 @@ void wxGraphicsContext::GetDPI( wxDouble* dpiX, wxDouble* dpiY) { if ( m_window ) { - const wxSize ppi = wxDisplay(m_window).GetPPI(); + const wxSize ppi = m_window->GetDPI(); *dpiX = ppi.x; *dpiY = ppi.y; }