[plugins/qpa] Don't crash on Qt5.12 OpengGL::makeCurrent
ClosedPublic

Authored by davidedmundson on Oct 5 2018, 12:04 AM.

Details

Summary

QOpenGLContext was changed to call platform->makeCurrent before it
called setCurrentContext.

Because we bind window FBO and ultimately that calls
QOpenGlContext::format we need Qt to know which context is current so it
can tell us the format.

This matches the QtWayland EGL code.

BUG: 399392

Test Plan

Switched virtual desktop with the OSD (previously reliably crashed)
Now it doesn't

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Oct 5 2018, 12:04 AM
Restricted Application added a project: KWin. · View Herald TranscriptOct 5 2018, 12:04 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Oct 5 2018, 12:04 AM
zzag accepted this revision.Oct 5 2018, 10:31 AM
zzag added a subscriber: zzag.
zzag added inline comments.
plugins/qpa/sharingplatformcontext.cpp
53

Please add a comment why we call setCurrentContext here.

This revision is now accepted and ready to land.Oct 5 2018, 10:31 AM
This revision was automatically updated to reflect the committed changes.