Comment 44 for bug 1546328

Dmitry Shachnev (mitya57) wrote :

@Len, I could not reproduce it on my own system with Xfce installed, but I can now reproduce it on Xubuntu daily CD.

According to D-Bus monitor, qjackctl doesn't even create a tray icon before everything hangs.

Looking at the code, I suppose such behavior may be a result of this call in src/qjackctl.cpp:

            XGrabServer(m_pDisplay);
            m_wOwner = m_pWidget->winId();
            XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime);

In this code, m_pWidget is hidden so has no winId, and calling XSetSelectionOwner with m_wOwner=0 may result in blocked X11 session. (Because of bad design of X11, apps can do that… In Wayland this isn't possible).

I very much recommend to not use X11 API directly in Qt applications, and use what Qt provides instead.