Qt World Summit: Submit your Presentation

QX11EmbedContainer::clientClosed() in Qt5?

  • I have been working on a X11 system tray (current code here) which uses the XEmbed protocol to embed tray application into the system tray. I have used QWindow::fromWinId() as noted here as the Qt5 replacement for QX11EmbedContainer, but I'm now at a bit of a loss on how to detect when the client application disconnects from the embedding. (Which causes my system tray to fill up with empty widgets.) QX11EmbedContainer had a signal clientClosed() which appears to be what I need, but I couldn't find any way to do this with QWindow. Any suggestions on what to do here?

  • Moderators

    Hi @spillerrec,

    Unfortunately, I don't think the QWindow::fromWinId() solution contains all the features from QX11EmbedContainer. I suggest you subscribe to the Interest mailing list and post there to talk directly to Qt engineers -- perhaps they might have a solution I haven't thought of, or you could request this feature from them.

  • You need to pull in xcb and watch for unmap notify events, and act accordingly.

Log in to reply