Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • wlroots wlroots
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 341
    • Issues 341
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 135
    • Merge requests 135
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wlrootswlroots
  • wlrootswlroots
  • Merge requests
  • !3809

Draft: wp-fractional-scale-v1 (w-p!149): new protocol implementation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Kirill Primak requested to merge vyivel/wlroots:fractional-scale into master Oct 30, 2022
  • Overview 1
  • Commits 26
  • Pipelines 9
  • Changes 36

Implements wayland/wayland-protocols!149

Depends on !3831 (merged)

Example compositor: https://gitlab.freedesktop.org/vyivel/loupe

Caveats

  • We use pixman to work with regions, so those are stored using integers.
    • One way to fix this completely would be to store factors alongside regions and apply them when necessary. This will work fine for wl_surface input regions and pointer constraining regions, but dealing with wl_surface opaque regions doesn't sound fun.

    • Another (somewhat hacky) solution which utilizes the fact that wl_fixed_t is technically int32_t:

      struct wlr_fixed_region {
              pixman_region32_t region;
      };

      Not sure how viable it is.

    • Of course, the 100% correct and sane solution would be to add a floating point region type. Maybe it's not as bad as it sounds.

Breaking changes

  • All coordinates and sizes are now double.
  • Custom protocol implementations now must apply wlr_surface.{client,server}_scale_factor.
    • This isn't strictly required if the compositor doesn't implement fractional scaling using this protocol.
Edited Nov 08, 2022 by Kirill Primak
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fractional-scale