Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69136

xwayland: program -geometry uses logical rather than physical coordinates; default window size is wrong (QT_AUTO_SCREEN_SCALE_FACTOR=1)



    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.0 Alpha, 5.12.1
    • QPA: Wayland, QPA: X11/XCB
    • Ubuntu 18.04 using a Gnome Wayland session
    • Linux/Wayland


      If I have a lower-resolution screen (full HD 27") connected to my 4K laptop, and start a program on that screen, the window will be created 3x as big as it should be. (you can see in the screenshot that the 100x100 window is actually 300x300)  Likewise, if I'm going to try to use -geometry to work around this at runtime, I must give a smaller size than I actually want.

      In my gnome settings: the laptop's 4K screen is set to 2X scaling, and the external screens are set to 1X.  And I have set QT_AUTO_SCREEN_SCALE_FACTOR=1 to try to correct other problems (it makes Creator and Assistant behave better, at least), but the downside is that it ignores the settings.

      Even on the external 4K screen, it's the same problem, because of my attempt to use 1X scaling on that screen (because 2X is too big for my taste).

      If I start up this same qml with a 100x100 window on the laptop screen, then with -platform xcb it gets scaled up (and the drawing is also scaled up) more than it does with the -platform wayland. Using screenruler to measure, it looks like the 100x100 window becomes 200x200 on wayland and 300x300 on xcb, on the laptop screen. Whereas on the external low-dpi screen, it will be 100x100 on wayland and 300x300 on xcb.


        1. creator.png
          114 kB
        2. IMG_20180626_150808442.jpg
          2.82 MB
        3. IMG_20180626_150814691_HDR.jpg
          2.79 MB
        4. IMG_20180626_150820461_HDR.jpg
          3.87 MB
        5. Screenshot from 2018-06-26 14-34-20.jpg
          Screenshot from 2018-06-26 14-34-20.jpg
          4.04 MB
        6. window.qml
          0.2 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              qt.team.graphics.and.multimedia Qt Graphics Team
              srutledg Shawn Rutledge
              1 Vote for this issue
              9 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes