CrimsonAS / gtkplatform

Run Qt applications using gtk+ as a windowing system.

Home Page:https://crimson.no

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix native display confusion in QX11Info

rburchell opened this issue · comments

The xcb platform plugin has a (IMO poorly named) "display" key to get the DIsplay* handle. The Wayland plugin made a compounding poor decision in top: it overloads "display" to get a wl_display*. The Wayland plugin later added a "wl_display" getter, so it is possible to identify Wayland easily.

This brings me to the crux of the problem: QX11Info::display() gets "display" unconditionally, without making sure it really is a Display*. I think the right way to fix this is to add a new resource, let's say called "x11_display", and to request that instead, and deprecate (and perhaps qWarning()) if "display" is requested, both in the Wayland and XCB plugins.

Similarly for QX11Info::isPlatformX11, it could then request "x11_display", and return false if it wasn't available.

This came up as an issue here.

[this is a mass update]

This is polite notice that gtkplatform is effectively end of life. Due to this, I've decided to archive the project.

I (and I think, the other contributors) have not been using it in quite some time, and I don't see that situation changing any time soon. In addition, none of us really have the time that it takes to do what it takes to keep the lights on, and this situation is going to get a lot harder soon with the impending arrival of Qt 6 and gtk 4 on the horizon.

Should anyone wish to take it over, you have my blessing to do so :)