Check whether it's platform xcb before calling QX11Info::display()

Internally QX11Info::display() calls into QPA native interface and
tries to resolve the nativeResourceForIntegration for "display".
Unfortunately this key also exists in other QPA plugins, e.g. in
QtWayland.

Calling without a check on platform results on wayland qpa in
wl_display* being casted into Display*.

REVIEW: 124203
master
Nerdopolis Turfwalker 9 years ago committed by Martin Gräßlin
parent 4c03115882
commit 924b66c4d5

@ -131,7 +131,7 @@ inline
KWIN_EXPORT Display* display()
{
static Display *s_display = nullptr;
if (!s_display) {
if (!s_display && QX11Info::isPlatformX11()) {
s_display = QX11Info::display();
}
return s_display;

Loading…
Cancel
Save