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

startSystemMove/Resize failing on X11 if app is launched via autostart or with Xwayland on demand

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      I'm getting some reports that application window can't be moved (it uses QWindow::startSystemMove). At the same time, some of they say that it works if applciation is restarted. One of the reporters confirmed that adding timeout to autostart desktop file helps (Xfce 4.12 from Xubuntu 18.04). Although, there's a case with GNOME Wayland: the problem is reproducible even when app is not autostatrted, I guess that's due to Xwayland starting on demand (so it starts simultaneously with the app and the race condition is in action).

       

      Some digging to Qt source code shows that startSystemMoveResize has a check:

      https://github.com/qt/qtbase/blob/ffa0ecdc5d507754ddd962e2edbc859c198b2700/src/plugins/platforms/xcb/qxcbwindow.cpp#L2359-L2361

       

      But it checks a vector pre-filled when QXcbConnection was estabilished:

      https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/xcb/qxcbwmsupport.cpp#L54-L57

      https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/xcb/qxcbconnection.cpp#L110

       

      So, if Qt app is started earlier than WM filled _NET_SUPPORTED property, it will run in a broken way. Non-working startSystemMoveResize is an obvious sign, but isSupportedByWM is used in a lot of other places.

       

      Apparently, Qt should update the vector at some point to work properly in such environments.

        Attachments

        1. telegram.mp4
          726 kB
          Rick Stanley
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            liaqi Liang Qi
            Reporter:
            ilya-fedin Ilya Fedin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes