Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 887
    • Issues 887
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 106
    • Merge requests 106
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Merge requests
  • !902

randr: Correctly get physical size for screen with RandR 1.5

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open JiangWu requested to merge wujiangGitHub/xserver:master into master May 19, 2022
  • Overview 20
  • Commits 1
  • Pipelines 4
  • Changes 1

According to the existing calculation method, multiple monitors are spliced into a virtual monitor, and there are some problems in the calculation of the virtual physical size. The existing way to calculate the virtual physical size: the resolution of the last monitor is divided by the resolution of the first monitor, and then multiplied by the physical size of the first monitor.

For example, two monitors are spliced into a virtual monitor, namely VGA-0(1920/477x1080/268+0+0)), DVI-0(1680/477x1050/268+1920+0). Because the resolution of DVI-0 is smaller than that of VGA-0, the virtual physical size will be 0 (1680/1920477=0, 1050/1080268=0).

The virtual physical size should be the virtual display resolution divided by the first display resolution multiplied by the first display physical size. For example mmWidth=double(3600/1920)*477, mmHeight= double(1080/1080)*268.

Signed-off-by: Jiang Wu wujiang@kylinos.cn

Edited Jun 17, 2022 by JiangWu
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master