Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Changes:
Bugfixes:
* Fixed libc version detection on FreeBSD without binutils installed, and on DragonFly BSD. (Libc, FreeBSD / DragonFly)
* Fixed CPU cache detection failing entirely when any CPU is offline. (#2736, CPUCache, Linux)
* Fixed the scale factor of rotated monitors on Wayland, e.g. a 1920x1200 monitor rotated by 90 degrees at scale 1 being reported as `@ 1.59x`. (Display, Linux)

# 2.71.0

Expand Down
6 changes: 4 additions & 2 deletions src/detection/displayserver/linux/wayland/global-output.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ static void waylandOutputGeometryListener(void* data,

static void handleXdgLogicalSize(void* data, [[maybe_unused]] struct zxdg_output_v1* _, int32_t width, [[maybe_unused]] int32_t height) {
WaylandDisplay* display = data;
// The logical size is already transformed, but the mode is not swapped until ffWaylandHandleRotation()
int32_t modeWidth = display->transform & WL_OUTPUT_TRANSFORM_90 ? display->height : display->width;
// Seems the values are only useful when ractional scale is enabled
if (width < display->width) {
display->dpi = (uint32_t) (display->width * 96 / width);
if (width < modeWidth) {
display->dpi = (uint32_t) (modeWidth * 96 / width);
}
}

Expand Down
Loading