Commit 60ab2125 authored by Christoph Cullmann's avatar Christoph Cullmann

fix rendering artifacts introduced by calling winId

winId shall not be called on non-native widgets

just call effectiveWinId that will handle this for us

BUG: 411965


(cherry picked from commit 343bc395)
parent a6136dd8
......@@ -205,15 +205,16 @@ WId Session::windowId() const
if (_views.count() == 0) {
return 0;
} else {
QWidget* window = _views.first();
Q_ASSERT(window);
while (window->parentWidget() != nullptr) {
window = window->parentWidget();
}
return window->winId();
/**
* compute the windows id to use
* doesn't call winId on some widget, as this might lead
* to rendering artifacts as this will trigger the
* creation of a native window, see https://doc.qt.io/qt-5/qwidget.html#winId
* instead, use https://doc.qt.io/qt-5/qwidget.html#effectiveWinId
*/
QWidget* widget = _views.first();
Q_ASSERT(widget);
return widget->effectiveWinId();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment