Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 1.6k
    • Issues 1.6k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 248
    • Merge requests 248
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • 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
  • GNOMEGNOME
  • gtkgtk
  • Issues
  • #2013
Closed
Open
Issue created Jul 11, 2019 by Jim Duchek@jimduchek

GDK-X11 breaks on an xrandr 1.5 'fake monitor' use case

Steps to reproduce

My specific use case (splitting a 4k monitor into 5 'virtual monitors'). Reproducible with any split though.

  xrandr --setmonitor HDMI-00 1280/266x960/200+0+0 HDMI-0  
  xrandr --setmonitor HDMI-01 1280/266x960/200+1280+0 none  
  xrandr --setmonitor HDMI-02 1280/266x960/200+2560+0 none  
  xrandr --setmonitor HDMI-03 1920/400x1200/250+0+960 none  
  xrandr --setmonitor HDMI-04 1920/400x1200/250+1920+960 none  

Current behavior

gdk_display_get_n_monitors -- returns 1 (the first one).

Expected outcome (Correct in gtk 2.0)

gdk_display_get_n_monitors -- returns 5 (all of them).

See attached patch. Issue is in init_randr15, if a monitor does not have an output, it is not added to the list. Am not sure my solution is 'correct' as I'm not sure what other cases will have a monitor with no output. It simply reuses the last 'valid' output, so it should still work correctly for a case where someone splits a monitor where someone physically has two monitors. I don't see how it can break anything, though.

Commit f3f998ef exists for this case, so somebody ran into it at some point.

It may be preferable to simply save off the subpixel order of the previous output and use a default string ('None' or the like) for the name, and use that instead when output_info is NULL, but this seemed preferable as the function may, in the future, use other attributes of the output than just subpixel order.

gdkscreen-x11.patch

Edited Sep 04, 2020 by Timm Bäder
Assignee
Assign to
Time tracking