Make wxDC::GetPPI() monitor-dependent in wxGTK3

Return the PPI for the display on which the associated window is shown
and not the main display PPI.
This commit is contained in:
Vadim Zeitlin
2018-11-01 00:07:24 +01:00
parent 4ad9cde380
commit 81c67c3686

View File

@@ -15,6 +15,7 @@
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/dcscreen.h"
#include "wx/display.h"
#include "wx/gdicmn.h"
#include "wx/icon.h"
#include "wx/gtk/dc.h"
@@ -238,7 +239,7 @@ wxSize wxGTKCairoDCImpl::GetPPI() const
{
if ( m_window )
{
return wxGetDisplayPPI();
return wxDisplay(m_window).GetPPI();
}
// For a non-window-based DC the concept of PPI doesn't make much sense