Sometimes gdk doesn't know how big a monitor is. This should not make us crash. --- pyanaconda/ui/gui/__init__.py | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py index 656051b..df98360 100644 --- a/pyanaconda/ui/gui/__init__.py +++ b/pyanaconda/ui/gui/__init__.py @@ -522,6 +522,10 @@ class GraphicalUserInterface(UserInterface): monitor_width_mm = screen.get_monitor_width_mm(primary) monitor_height_mm = screen.get_monitor_height_mm(primary)
+ # Sometimes gdk returns 0 for physical widths and heights + if monitor_height_mm == 0 or monitor_width_mm == 0: + return + # Check if this monitor is high DPI, using heuristics from gnome-settings-dpi. # If the monitor has a height >= 1200 pixels and a resolution > 192 dpi in both # x and y directions, apply a scaling factor of 2 so that anaconda isn't all tiny