fix(monitor-manager): account for scale when computing logical monitor size

logical_width/height now divide physical pixels by scale so the canvas
correctly represents the compositor's coordinate space (e.g. 3840px @1.5x
is 2560 logical px wide, not 3840).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-06-26 08:34:34 +02:00
parent f8b5f1aa6a
commit 7016388210
1 changed files with 4 additions and 4 deletions

View File

@ -114,14 +114,14 @@ class MonitorState:
@property
def logical_width(self) -> int:
if (self.transform & 3) in (1, 3):
return self.height
return self.width
return round(self.height / self.scale)
return round(self.width / self.scale)
@property
def logical_height(self) -> int:
if (self.transform & 3) in (1, 3):
return self.width
return self.height
return round(self.width / self.scale)
return round(self.height / self.scale)
@property
def mode_str(self) -> str: