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

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

XMLWordPrintable

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

      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).

        1. xscope-spectacle.txt
          21 kB
        2. qtbug-56446.pro
          0.1 kB
        3. grabtest.cpp
          2 kB
        4. CMakeLists.txt
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes