plasmawindowed: Use shared contexts analogue to plasmashell
Original commit message(s)
- plasmawindowed: Use shared contexts analogue to plasmashell
This fixes loading applets using QtWebEngine, which otherwise may complain about something like this:
"QtWebEngineQuick::initialize() must be called from the Qt gui thread."
According to Qt's docs [1] setting the Qt::AA_ShareOpenGLContexts attribute before constructing a QGuiApplication, has the same effect as QtWebEngineQuick::initialize() and avoids pulling in the humongous dependency.
For plasmashell it has been introduced with 6c1c6b86.
[1] https://doc.qt.io/qt-6/qtwebenginequick.html
Test plan
Ran plasmawindowed org.kde.plasma_applet_dict
and org.kde.plasma.webbrowser
, which showed up and allowed me to do things with them. I did only test against 6.2.3 though.