Don't use gdk_screen_xxx_mm() with multiple displays
These functions combine the sizes of all displays and so only return the correct size when there is only a single display. This fixes wildly wrong PPI values returned when more than one display is used.
This commit is contained in:
@@ -317,7 +317,7 @@ wxSize wxDisplayImplGTK::GetSizeMM() const
|
|||||||
// At least in some configurations, gdk_screen_xxx_mm() functions return
|
// At least in some configurations, gdk_screen_xxx_mm() functions return
|
||||||
// valid values when gdk_screen_get_monitor_xxx_mm() only return -1, so
|
// valid values when gdk_screen_get_monitor_xxx_mm() only return -1, so
|
||||||
// handle this case specially.
|
// handle this case specially.
|
||||||
if ( IsPrimary() )
|
if ( gdk_screen_get_n_monitors(m_screen) == 1 )
|
||||||
{
|
{
|
||||||
return wxSize(gdk_screen_width_mm(), gdk_screen_height_mm());
|
return wxSize(gdk_screen_width_mm(), gdk_screen_height_mm());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user