Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 946
    • Issues 946
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 121
    • Merge requests 121
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and 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
  • xorgxorg
  • xserverxserver
  • Merge requests
  • !981

Don't remove an existing monitor from an output if another monitor is added

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Michael Wyraz requested to merge mwyraz/xserver:feature/split-screen into master Oct 14, 2022
  • Overview 6
  • Commits 1
  • Pipelines 6
  • Changes 1

In commit 7e1f86d4 monitor support was added to randr. At this time it seemed to be reasonable not to have more than one (virtual) monitor on a particular physical display. The code was never changed since.

Nowadays, extremely large displays exists (4k displays, ultra-wide displays). In some use cases it makes sense to split these large physical displays into multiple virtual monitors. An example are ultra-wide screens that can be split into 2 monitors. The change in this commit makes this work.

Besides that, removing a monitor in a function that is called "RRMonitorAdd" is bad practice and causes unexpected behaviour.

More information and discussion can be found at https://gitlab.gnome.org/GNOME/gtk/-/issues/2013#note_1564528 .

Are there possible impact to people that rely on this feature?

Potentially, that change breaks scripts that adds a monitor to a display where already a monitor exists. In my opinion it is very unlikely that such situations exists. There may be scripts that add a single monitor to a screen so that the monitor has a name different from the implicit default monitor name that is assigned if no user defined monitor is added to a screen. This still works as before with my change. Besides that, it is always possible to delete existing monitors with randr/xrandr.

Edited Feb 10, 2023 by Michael Wyraz
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/split-screen