Skip to content

Commit 3943268

Browse files
Fix scaling on Wayland
1 parent 567ae3f commit 3943268

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

multiwindow_unity.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ void CustomWindow::setTargetSize(int w, int h) {
689689

690690
void CustomWindow::updateThings() {
691691
auto primaryScreen = app->primaryScreen();
692-
qreal scaling = this->devicePixelRatio();
692+
qreal scaling = waylandType == WaylandType::None ? this->devicePixelRatio() : 1;
693693
auto primaryScreenGeometry = screenGeometries[primaryScreen];
694694
auto unitedScreenGeometry = screenGeometries.first();
695695
int smallestHeight = 999999; // KDE window constraints are buggy. Other monitors also have invisible taskbar limits.
@@ -842,7 +842,7 @@ void CustomWindow::paintEvent(QPaintEvent* paintEvent) {
842842
return;
843843
}
844844

845-
qreal scaling = this->devicePixelRatio();
845+
qreal scaling = waylandType == WaylandType::None ? this->devicePixelRatio() : 1;
846846

847847
painter.drawImage(QRect(
848848
this->cutoffX,

0 commit comments

Comments
 (0)