Sitelet https://github.com/vsg-dev/VulkanSceneGraph/issues/1328
Skip to content

Display resolution/scaling and window size problems #1328

Description

@rserban

Describe the bug
The window size does not seem to respect display scaling settings (Linux Ubuntu 22.04.5)

To Reproduce

  1. Set window size (WindowTraits::width and WindowTraits::height) to match display resolution (2880x1800 in my case).
    (I used the vsgwindow example here and modified the size of the second window it creates)

  2. Set display scale to 100% and run example. The window will fill the screen (as expected).

  3. Set display scale to 150% and run example. The window will be smaller than the screen size.

Expected behavior
In step 3 above, I expected the window size to be larger than the actual screen. Instead, I get the results shown in the screenshot below.

Note that the same experiment on Windows 11 (23H2) gives the expected results.

Screenshot
unnamed

Comments
Here's the output from xandr -q:

radu@zephyrus:~$ xrandr -q

Screen 0: minimum 320 x 200, current 3840 x 2400, maximum 16384 x 16384
eDP-1 connected primary 3840x2400+0+0 (normal left inverted right x axis y axis) 302mm x 189mm
   2880x1800     60.00*+ 120.00 +  96.00    72.00    60.00    50.01    48.00  
   1920x1200    120.00  
   1920x1080    120.00  
   1600x1200    120.00  
   1680x1050    120.00  
   1280x1024    120.00  
   1440x900     120.00  
   1280x800     120.00  
   1280x720     120.00  
   1024x768     120.00  
   800x600      120.00  
   640x480      120.00  

The screenshot I attached above suggests that the window size is based off the current values for the virtual screen (3840x2400) and ignores the actual display resolution and scaling.

Additional context
In case this was addressed in more recent commits, here are the versions I'm using:

  • vsg: Tag v1.1.4
  • vsgXchange: Tag v1.1.2
  • vsgImGui: latest
  • vsgExamples: Tag v1.1.4
  • assimp: Tag v5.3.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions