https://bugs.kde.org/show_bug.cgi?id=510569
Noah Davis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from Noah Davis <[email protected]> --- (In reply to Nate Graham from comment #2) > The problem is in SelectionEditor::reset(), which sets the devicePixelRatio > to qGuiApp->devicePixelRatio(), which in our cases returns a ceil()'ed > version of the actual DPR (i.e. 2 instead of 1.25 or 1.75). It should be > using QWindow::devicePixelRatio() instead so it can get a more accurate > value. It's actually not supposed to return a ceiled value. It seems that the fundamental issue is that QScreen and QWindow/QQuickWindow/CaptureWindow return the wrong values for the DPR when there are two screens with one set to 1.25x DPR and the other set to 1.75x. It seems that the issue is not fixable from Spectacle's side. Using windows instead of QScreen after ensuring that the windows are created first, which should provide correct DPRs: > const auto windows = CaptureWindow::instances(); > Q_ASSERT(!windows.empty()); > const auto dpr = std::accumulate(windows.cbegin(), windows.cend(), 0.0, > [](qreal dpr, CaptureWindow *w) { > qDebug() << w->devicePixelRatio(); > return std::max(dpr, w->devicePixelRatio()); > }); > qDebug() << "max dpr" << dpr; Output with 1.25 and 1.75 DPR screens: > ❯ spectacle -i > 2 > 2 > max dpr 2 -- You are receiving this mail because: You are watching all bug changes.
