Merge pull request #2250 from akortunov/guifixes

Do not swap buffers for non-exposed windows
pull/541/head
Bret Curtis 6 years ago committed by GitHub
commit d794547e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,6 +40,7 @@
Bug #4876: AI ratings handling inconsistencies
Bug #4877: Startup script executes only on a new game start
Bug #4888: Global variable stray explicit reference calls break script compilation
Bug #4911: Editor: QOpenGLContext::swapBuffers() warning with Qt5
Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis

@ -17,6 +17,7 @@
#include <osgViewer/ViewerBase>
#include <QInputEvent>
#include <QPointer>
#include <QWindow>
#if (QT_VERSION>=QT_VERSION_CHECK(4, 6, 0))
# define USE_GESTURES
@ -518,6 +519,12 @@ bool GraphicsWindowQt::releaseContextImplementation()
void GraphicsWindowQt::swapBuffersImplementation()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
// QOpenGLContext complains if we swap on an non-exposed QWindow
if (!_widget || !_widget->windowHandle()->isExposed())
return;
#endif
_widget->swapBuffers();
// FIXME: the processDeferredEvents should really be executed in a GUI (main) thread context but

Loading…
Cancel
Save