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

QScreen::grabWindow (QXcbScreen::grabWindow) fails with InputOnly windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.7.0
    • QPA: X11/XCB
    • None
    • Arch Linux, qt5-base 5.7.0, xorg-server 1.18.4-1

    Description

      QXcbScreen::grabWindow does not properly handle windows which have input class InputOnly. According to https://tronche.com/gui/x/xlib/window/create.html#InputClass, windows of InputOnly cannot be used as drawable.

      Proposed solution: if the attributes reply has class InputOnly, fall back to capturing from the root window.

      Attached is a xscope log that demonstrates the X11 communication. First there is one request that fails, followed by one that succeeds. The window ID is a foreign one (the application in question is a screenshot tool).

      Attachments

        1. CMakeLists.txt
          0.5 kB
        2. grabtest.cpp
          2 kB
        3. qtbug-56446.pro
          0.1 kB
        4. xscope-spectacle.txt
          21 kB

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              Lekensteyn Peter Wu
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes