An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

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 @@ ...@@ -48,6 +48,10 @@
#include "qx11info_x11.h" #include "qx11info_x11.h"
#endif #endif
#if defined(Q_WS_WIN)
# include <windows.h>
#endif
#include "vtkInteractorStyleTrackballCamera.h" #include "vtkInteractorStyleTrackballCamera.h"
#include "vtkRenderWindow.h" #include "vtkRenderWindow.h"
#if defined(QVTK_USE_CARBON) #if defined(QVTK_USE_CARBON)
...@@ -805,6 +809,17 @@ void QVTKWidget::x11_setup_window() ...@@ -805,6 +809,17 @@ void QVTKWidget::x11_setup_window()
#endif #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) #if defined (QVTK_USE_CARBON)
OSStatus QVTKWidget::DirtyRegionProcessor(EventHandlerCallRef, EventRef event, void* wid) OSStatus QVTKWidget::DirtyRegionProcessor(EventHandlerCallRef, EventRef event, void* wid)
{ {
......
...@@ -248,6 +248,10 @@ protected: ...@@ -248,6 +248,10 @@ protected:
// that VTK chooses // that VTK chooses
void x11_setup_window(); void x11_setup_window();
#if defined(Q_WS_WIN)
bool winEvent(MSG* msg, long* result);
#endif
#if defined(QVTK_USE_CARBON) #if defined(QVTK_USE_CARBON)
EventHandlerUPP DirtyRegionHandlerUPP; EventHandlerUPP DirtyRegionHandlerUPP;
EventHandlerRef DirtyRegionHandler; 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