Skip to content

Bug: Scale is defined as i32 #171

@WhyNotHugo

Description

@WhyNotHugo

Throughout the codebase, the scale is defined as i32.
This makes it impossible to properly obtain or set a scale, since compositors don't use integers for this. As a result, applications using client-toolkit are rendered blurry.

For example, on my current setup:

$ swaymsg -t get_outputs
Output eDP-1 'Sharp Corporation 0x148B 0x00000000'
  Current mode: 3840x2160 @ 59.997002 Hz
  Scale factor: 2.500000...

Output DP-2 'Ancor Communications Inc ROG PG348Q #ASMuhJCcVsHd' (focused)
  Current mode: 3440x1440 @ 59.973000 Hz
  Scale factor: 1.500000
...

I took a quick look at sway's codebase, and it seems to use double or float for scaling factors (although defined simply at 1.5 in the config).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions