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)

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes