From dc982d519b0e6353087429f3f718e4969e77b14e Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 14 Nov 2016 17:41:45 +0100 Subject: [PATCH] Only set WA_PaintOnScreen when doing custom painting --- qrenderdoc/Widgets/CustomPaintWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Widgets/CustomPaintWidget.cpp b/qrenderdoc/Widgets/CustomPaintWidget.cpp index 0c2273309..68a9082ed 100644 --- a/qrenderdoc/Widgets/CustomPaintWidget.cpp +++ b/qrenderdoc/Widgets/CustomPaintWidget.cpp @@ -33,7 +33,6 @@ CustomPaintWidget::CustomPaintWidget(QWidget *parent) : QWidget(parent) m_Ctx = NULL; m_Output = NULL; setAttribute(Qt::WA_OpaquePaintEvent); - setAttribute(Qt::WA_PaintOnScreen); setMouseTracking(true); } @@ -42,7 +41,8 @@ CustomPaintWidget::CustomPaintWidget(CaptureContext *c, QWidget *parent) : QWidg m_Ctx = c; m_Output = NULL; setAttribute(Qt::WA_OpaquePaintEvent); - setAttribute(Qt::WA_PaintOnScreen); + if(c) + setAttribute(Qt::WA_PaintOnScreen); setMouseTracking(true); }