Commit c5d4f4c2 authored by Clinton Stimpson's avatar Clinton Stimpson
Browse files

Fix QVTKWidget problem on Windows with Aero off.

Need to invalidate the whole region at the start of WM_PAINT so the
desktop compositor will composite the whole area.

Change-Id: I447f190bae2c549a6d0b86647141a546089b5ed3
parent eca0fc4f
......@@ -48,6 +48,10 @@
#include "qx11info_x11.h"
#endif
#if defined(Q_WS_WIN)
# include <windows.h>
#endif
#include "vtkInteractorStyleTrackballCamera.h"
#include "vtkRenderWindow.h"
#if defined(QVTK_USE_CARBON)
......@@ -805,6 +809,17 @@ void QVTKWidget::x11_setup_window()
#endif
}
#if defined(Q_WS_WIN)
bool QVTKWidget::winEvent(MSG* msg, long*)
{
if(msg->message == WM_PAINT)
{
InvalidateRect(this->winId(), NULL, FALSE);
}
return false;
}
#endif
#if defined (QVTK_USE_CARBON)
OSStatus QVTKWidget::DirtyRegionProcessor(EventHandlerCallRef, EventRef event, void* wid)
{
......
......@@ -248,6 +248,10 @@ protected:
// that VTK chooses
void x11_setup_window();
#if defined(Q_WS_WIN)
bool winEvent(MSG* msg, long* result);
#endif
#if defined(QVTK_USE_CARBON)
EventHandlerUPP DirtyRegionHandlerUPP;
EventHandlerRef DirtyRegionHandler;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment