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 883
    • Issues 883
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 103
    • Merge requests 103
  • 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
  • !270

Xwayland randr and vidmode resolution change emulation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Hans de Goede requested to merge jwrdegoede/xserver:xwayland-randr-resolution-emulation into master Aug 26, 2019
  • Overview 129
  • Commits 13
  • Pipelines 7
  • Changes 12

This series adds support for emulation of resolution changes through the randr and vidmode extensions. The resolution is not actually changed, instead Xwayland will use WPviewport to make a (fullscreen) window at the requested resolution fill the entire monitor, as the window would if the resolution was actually changed.

Note aspect-ratio is ignored, I checked what real 16:9 / 16:10 monitors do when set to a 4:3 resolution and the ones I have access to all simply stretch the image to fill the entire monitor. So we do the same here which is the KISS way of handling aspect-ratio, so I like it.

The main goal of this series is to make games, which may very well be hardcoded to render at only a specific resolution, work properly under Xwayland instead of showing a small image with a big black letterbox around it, or in some cases showing a small image in the left top or bottom (glx) corner of the monitor.

This series has been successfully tested with the following games:

  • SDL 1.2 2d game: lbrickbuster2
  • SDL 1.2 relmouse: d1x-rebirth-sdl
  • SDL 1.2 3d game: d1x-rebirth-gl
  • SDL 2.0 2d game: "SDL_RENDER_DRIVER=software shippy"
  • SDL 2.0 3d game: shippy, supertux2
  • SFML: etr, marshooter
  • Clanlib-0.6 game: auriferous, clanbomber
  • Clanlib-1.0 game: trophy
  • Clanlib-2.3 game: methane, does not seem to do resolution changes for fs
  • allegro4 2d game: worminator, lacewing
  • allegro4 3d game: machineball

It has also been successfully tested with mixed HiDPI setups using gnome-shell in both classic HiDPI mode and in the new fractional scaling HiDPI mode.

This is partly based on earlier work on this by Robert Mader.

Edited Dec 08, 2020 by Aaron Plattner
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: xwayland-randr-resolution-emulation