Skip to content

Commit 4900d5a

Browse files
committed
Avoid window blink when handling OpenGL
1 parent b77cc03 commit 4900d5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DockAreaWidget.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,10 @@ void CDockAreaWidget::setCurrentIndex(int index)
725725
Q_EMIT currentChanging(index);
726726
TabBar->setCurrentIndex(index);
727727
d->ContentsLayout->setCurrentIndex(index);
728+
#ifdef USE_NATIVE_WIDGETS
729+
// Force the widget to be native in order to avoid blinks with OpenGL widgets
730+
d->ContentsLayout->currentWidget()->winId();
731+
#endif
728732
d->ContentsLayout->currentWidget()->show();
729733
// Force the repaint of the current widget because mix of OpenGL widgets
730734
// and Raster widgets could have not been entirely rendered

0 commit comments

Comments
 (0)