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

xcb: Single process (GUI application) with multiple X display connections.

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P4: Low
    • 6.0
    • 5.6.0
    • QPA: X11/XCB
    • None

    Description

      XCB platform plugin contains unmaintained code for Multiple X Display Connections from a Single Process. Decide if we want to support this or no.

      The current situation is:

      • This code was introduced in 2011 as an experimental feature (https://codereview.qt-project.org/#/c/2103/) and have been untested/unmaintained ever since (as far as I can tell). It has never been documented in QGuiApplication under "Supported Command Line Options". The intended command line was: ./app -platform xcb:address:display
      • There are no JIRA bugs where users would complain that this feature does not work and they would need it (I did not find any). I don't even expect it to work in its current state, where almost all functions care only about the "default" connection, and don't attempt to support multi-connection. See more about this bellow.
      • Seeing this undocumented code in the platform plugin is distracting for new contributors.
      • XCB plugin respects the "-display" command line and DISPLAY envvar. This is sufficient to get your windows on different X displays. This is not the same as single process being able to create windows on several X displays simultaneously, but the question is - who would need this exotic setup?

      Testing on a localhost:

      Prerequisite: Create a new user account, log into the newly created account. This will start another X display (:1). Run "xhost +" on that account.
      Tip: Create a shortcut for " dm-tool switch-to-greeter", you can use this to quickly toggle between accounts.

      1) From the default account (where X display is at :0) start the "qscreen" manual autotest (qtbase/tests/manual/qscreen);
      ./qscreen -platform xcb::1 // Windows are not painted properly
      Try
      QT_XCB_GL_INTEGRATION=none ./qscreen -platform xcb::1
      Now windows are painted fine, but things like drag-and-drop and copy-and-paste* does not work.

      *from Qt window to some other place. Clipboard is optimized to bypass X server when copy-pasting within Qt application, so that is not a proper test case here.

      Testing over a network:

      1) set xhost + on your development machine.
      2) Now from another PC connect to your development machine:
      ssh -X user@ip_address
      3) ./qscreen -platform xcb::0 // This will create window on both machines. Over network "QT_XCB_GL_INTEGRATION=none" does not seem to be required for GUI to work, but other issues are still there.

      Proposed patch to remove this stale code: https://codereview.qt-project.org/#/c/154756/

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              paeglis Gatis Paeglis
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes