On 20 Nov 2020, at 14:55, Richard Moore <r...@kde.org<mailto:r...@kde.org>> 
wrote:



On Fri, 20 Nov 2020 at 07:58, Volker Hilsheimer 
<volker.hilshei...@qt.io<mailto:volker.hilshei...@qt.io>> wrote:
In Qt 6 there is no more Qt API to get the X11 root window for a display (also 
note that QDesktopWidget as a whole is gone).

So, you either have to go native if you rely on X11 specific data structures 
(which the code does anyway, in verifying that there is a DISPLAY environment 
variable), or pass a pointer to (or index of) a QScreen if you want to place a 
UI on a specific display.

I'd hope there's a way to get the actual connection being used, rather than 
relying on looking at the environment variables. For example, what happens if 
-display is passed?

Not at the moment, as XCB doesn’t expose that. Xlib does, but only if the 
connection was created using Xlib. An API to expose whatever Qt decides to use 
based on parsing DISPLAY or -display, like we have in QX11Extras, is being 
considered, but won’t be in 6.0. Ideally XCB would expose this, so we don’t 
need to add workarounds in Qt.

Cheers,
Tor Arne

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to