It appears QScreen.physicalDotsPerInch for Mir is implemented in QtMir: void Screen::setMirDisplayConfiguration(const mir::graphics::DisplayConfigurationOutput &screen) { ... // Physical screen size m_physicalSize.setWidth(screen.physical_size_mm.width.as_float()); m_physicalSize.setHeight(screen.physical_size_mm.height.as_float());
Per previous comments above however I have not been able to find any case in which these values from Mir were wrong. It appears that possibly QtMir is getting its data from an inactive or invalid mir::graphics::DisplayConfigurationOutput. So QtMir should be careful to enumerate all the outputs available and pick one that is valid, because some outputs do exist but are unplugged or turned off. And so will have invalid data in some fields like physical_size_mm. ** Package changed: qtubuntu (Ubuntu) => qtmir (Ubuntu) ** Package changed: unity8 (Ubuntu) => qtmir -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1525293 Title: "window->screen()->physicalDotsPerInch() / 25.4" may be negative on xenial To manage notifications about this bug go to: https://bugs.launchpad.net/mir/+bug/1525293/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs