mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 22:45:15 -04:00
Close graphics context while it still exists
This commit is contained in:
parent
e1a5435531
commit
ac256f05ff
7
extern/osgQt/GraphicsWindowQt.cpp
vendored
7
extern/osgQt/GraphicsWindowQt.cpp
vendored
@ -119,6 +119,13 @@ bool GLWidget::event( QEvent* event )
|
||||
enqueueDeferredEvent(QEvent::ParentChange);
|
||||
return true;
|
||||
}
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||||
else if (event->type() == QEvent::PlatformSurface && static_cast<QPlatformSurfaceEvent*>(event)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed)
|
||||
{
|
||||
if (_gw)
|
||||
_gw->close();
|
||||
}
|
||||
#endif
|
||||
|
||||
// perform regular event handling
|
||||
return QGLWidget::event( event );
|
||||
|
Loading…
x
Reference in New Issue
Block a user