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

Screenshots are broken for multi screen setups under OS X 10.7

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P4: Low
    • None
    • 4.8.0
    • Image formats
    • None
    • Mac OS X 10.7.2
      Qt 4.8.0
    • macOS

    Description

      Since OS X 10.7 previously working screenshot code is not working anymore.
      Qt 4.8 fixed that only a black image was returned.

      Still with multiple screens somehow content from secondary displays gets copied onto the primary display.

      Example Screenshots:
      http://sau.frubar.net/p/shots/011m2hOskvSiQk2la2sAAQ.jpg (big left screen is primary)
      http://sau.frubar.net/p/shots/MSmgT73Hpc8KvfVu3Kv2dQ.jpg (small right screen is primary)

      Code that previously worked:

      QPixmap shot;
      QRect allScreens;
      
      for(int i = 0; i < QApplication::desktop()->numScreens(); ++i) {
      	allScreens = allScreens.united(QApplication::desktop()->screenGeometry(i));
      }
      
      shot = QPixmap::grabWindow(QApplication::desktop()->screen(-1)->winId(),
      							allScreens.x(),
      							allScreens.y(),
      							allScreens.width(),
      							allScreens.height());
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            sw Sebastian Wiedenroth
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes