Skip to content

Commit

Permalink
Make wxDC::GetPPI() monitor-dependent in wxGTK3
Browse files Browse the repository at this point in the history
Return the PPI for the display on which the associated window is shown
and not the main display PPI.
  • Loading branch information
vadz committed Nov 1, 2018
1 parent 4ad9cde commit 81c67c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gtk/dc.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 81c67c3

Please sign in to comment.