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

showFullcreen on multi monitor systems always shows the window fullscreen on the primary monitor.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.1.0 Beta 1
    • 5.0.2
    • None
    • Windows XP SP3; NVIDIA GeForce 7300 SE
      Dual monitor setup, left monitor is number 1, right one is number 2. Right Monitor is set to be the primary monitor. Windows desktop spans over both monitors.
    • ded4613ae43842d4b960137843eb83a7472adc65

    Description

      When I call showFullscreen on a window I expect it to be shown fullscreen on the monitor the window is located. This was the behaviour on Qt 4.8.2 when setting the Qt::WindowFullScreen flag on the window state. Now, if I call showFullscreen on a window in Qt 5.0.2, that window gets shown in fullscreen mode, however, always on the primary monitor, not on the monitor the window is located.

      What I found is that previously (Qt 4.8.2) the geomtry used to position the window in fullscreen mode got fetched via 'QApplication::desktop()>screenNumber(pWindow)', in Qt 5.0.2 the geometry gets fetched via 'pWindow>window()>windowHandle()>screen()->geometry()'. The latter seems to ALWAYS return the geometry of the primary screen no matter where the window is located on the desktop.

      This 'new' behaviour is especially problematic in my situation because I have several graphic views which shall be shown fullscreen on different screens on multi head systems (two or more monitors).

      Note: Attached is a small test project which I created to test this issue.

      Attachments

        1. main.cpp
          0.2 kB
        2. mainwindow.cpp
          1 kB
        3. mainwindow.h
          0.4 kB
        4. mainwindow.ui
          3 kB
        5. qtbug30724.tar
          10 kB
        6. screentest.pro
          0.4 kB

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              peersch Peer Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes