Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • wayland wayland
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 150
    • Issues 150
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 57
    • Merge requests 57
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • waylandwayland
  • waylandwayland
  • Merge requests
  • !220

protocol: add wl_surface.preferred_buffer_scale and transform

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon Ser requested to merge emersion/wayland:surface-scale into main Mar 28, 2022
  • Overview 73
  • Commits 2
  • Pipelines 14
  • Changes 1

Right now, clients need to bind to wl_output globals, listen to wl_output.scale, listen to wl_surface.enter/leave, pick the highest scale factor.

This is an issue because it breaks Wayland's "policy, not mechanism" motto. Clients take the decision of which scale to use depending on the outputs they're on, compositors have no say in this (apart from faking output events, which isn't great).

This commit introduces a new wl_surface.preferred_buffer_scale event to allow compositors to directly indicate the preferred scale factor for each surface.

This unlocks features which require dynamically changing the scale such as:

  • Accessibility features such as screen magnifier
  • In a VR environment, render surfaces close to the eye at a higher scale
  • HiDPI screenshots on LoDPI screens

Closes: #271 (closed)

Implementations:

  • wlroots: wlroots/wlroots!3696
  • mpv: https://github.com/mpv-player/mpv/pull/11287
  • kwin: https://invent.kde.org/plasma/kwin/-/merge_requests/3564
Edited Feb 08, 2023 by Simon Ser
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: surface-scale