[vtkusers] QVTKWidget only partially redrawing itself on win7 without AERO.

Jesús Spí­nola jspinola at gmail.com
Mon Mar 4 06:51:07 EST 2013


Hi,

as suggested by Clint, we've applied the attached patch to VTK 5.6.1. We've
tested it on Windows XP and Windows 7 (32 & 64 bit) and it fixed the issue
successfully.


On Wed, Jan 9, 2013 at 10:19 AM, Jesús Spí­nola <jspinola at gmail.com> wrote:

> As we only develop for Windows XP/7 (32 and 64 bit) we haven't tested for
> Vista nor 8. We don't have any machine with those systems so we can't test
> that either. We only took into account XP and 7 because they are the only
> we can test. If Vista and 8 are also affected by this bug, we should add
> the conditions to only call InvalidateRect() when the system is Windows XP.
>
> In our case we are always using double buffering.
>
>
> On Mon, Jan 7, 2013 at 4:01 PM, <clinton at elemtech.com> wrote:
>
>> Thanks...  but do you know what needs to be done for Windows Vista and
>> Windows 8?  I assume XP is the only one we need to skip the InvalidateRect
>> for.
>> See this:  https://bugreports.qt-project.org/browse/QTBUG-7865, where
>> the problem was seen on both Vista and 7.
>> Also see the patch they applied to fix it.
>>
>> http://qt.gitorious.org/qt/digia-qt/commit/392123ef5432643d1047d1e1dd71512ec39d382d?format=patch
>>
>> I noticed that they check for double buffering and only call
>> InvalidateRect() for double buffering cases, and not single buffering.  Can
>> you check if it was actually single buffered on your Windows XP machine?
>>  Maybe we should use that flag instead of the Windows version.
>>
>> Clint
>>
>> ------------------------------
>>
>> Hello,
>>
>> I used the patch mentioned above and it works as expected on Windows 7,
>> but there's still some issues if you are on a Windows XP system. If you
>> apply this patch and use a QVTKWidget on a Windows XP system, there will
>> appear white blinking areas when you pass over any application window or
>> dialog (not necessarily a Qt one or from the same application, it occurs
>> with any window), which makes it really annoying, specially if you are
>> using diagnostic monochrome displays.
>>
>> If the problem only affects Windows 7 it should be only applied when we
>> are on a Windows 7 system, so I made a little modification of this patch to
>> accomplish this, so the InvalidateRect() call is only made on Windows 7
>> systems. I've attached a patch with this modification which I tested on
>> Windows 7 with Aero om/off and on Windows XP as well.
>>
>> If any of you find this could be done in a better fashion, please share
>> it so the issue will be fixed for any system with no collateral effects.
>>
>>
>> On Fri, Jun 1, 2012 at 10:23 PM, Clinton Stimpson <clinton at elemtech.com>wrote:
>>
>>>
>>> Here's a better fix, if you want to apply it to your local build.
>>> http://review.source.kitware.com/#/c/6051/
>>>
>>> Clint
>>>
>>> On Wednesday, May 02, 2012 06:35:46 PM Alex Malyushytskyy wrote:
>>> > Clint,
>>> >
>>> > You actually helped me at least to find a temporary workaround.
>>> >
>>> > I removed Qt::MSWindowsOwnDC flag and problem seems fixed and there is
>>> > no visually other problem occurred during quick testing.
>>> >
>>> > It still seems a bug in QT ( such change supposed to affect ONLY top
>>> > level widgets ).
>>> > and in my application QVTKWidget  is not top level.
>>> > But since it fixed an issue, I will keep it until it lasts.
>>> >
>>> > It might not work with QT 5.0, but due to new grapics implementation I
>>> > expect more problems during transition anyway.
>>> >
>>> > Thanks and regards,
>>> >    Alex
>>> >
>>> > > On Wed, May 2, 2012 at 5:20 PM, Clinton Stimpson <
>>> clinton at elemtech.com>
>>> wrote:
>>> > >> It was "fixed" then reverted because the fix was incorrect.
>>> > >>
>>> > >> I've narrowed the problem down to a change of behavior in the Qt
>>> > >> library, and reported it.
>>> > >> https://bugreports.qt-project.org/browse/QTBUG-23425
>>> > >>
>>> > >> But I've not had much time to look further into it.
>>> > >> I would suggest working with the Qt developers to get this fixed.
>>>  If
>>> > >> you can help with that, that would be great. I think part of the
>>> > >> problem is their QtGui library has code to make a QGLWidget work,
>>> but
>>> > >> its difficult to turn the same code on for any other OpenGL based
>>> > >> QWidget that doesn't derive from QGLWidget.
>>> > >>
>>> > >> If you haven't voted for it, please do, so other Qt developers will
>>> > >> notice.
>>> > >>
>>> > >> Clint
>>> > >>
>>> > >> On May 2, 2012, at 5:56 PM, Alex Malyushytskyy wrote:
>>> > >>> Problem on stable release of vtk 5.8.0
>>> > >>>
>>> > >>> My application displays splash screen  while model is drawn.
>>> > >>> When splash screen is gone and user starts interaction with model,
>>> > >>> only part of the QVTKWidget is displaying correct picture,
>>> > >>> most area which was not  covered by splash screen remains unchanged
>>> > >>> (has whatever it displayed before interaction started).
>>> > >>> If QVTKWidget is minimized/maximized it fixes the problem.
>>> > >>>
>>> > >>> If AERO is on everything works as expected.
>>> > >>> vtk version 4.* did not have such problem.
>>> > >>>
>>> > >>> It seems any drawing which happens when QVTKWidget widget is
>>> > >>> covered(not only to the case of splashscreen)
>>> > >>> leeds to such nasty behaviour.
>>> > >>>
>>> > >>> This makes vtk unusable on win 7 since I can't inforce user to have
>>> > >>> AERO on, not even counting that some computers might not be able to
>>> > >>> support it physically.
>>> > >>>
>>> > >>> It was an old  conversation about related topic at:
>>> > >>>
>>> http://vtk.1045678.n5.nabble.com/Problem-with-QVTKWidget-not-expandi
>>> > >>> ng-in-win7-td4533383.html
>>> > >>>
>>> > >>> Even though it was stated that problem should be fixed in 5.8., it
>>> > >>> still remains.
>>> > >>>
>>> > >>> Could anybody point which changes should be made to fix a problem
>>> > >>> and
>>> > >>> is there a way to push patch that problem finally is fixed in an
>>> > >>> official version?
>>> > >>>
>>> > >>> Regards,
>>> > >>>
>>> > >>> Alex
>>> > >>> _______________________________________________
>>> > >>> Powered by www.kitware.com
>>> > >>>
>>> > >>> Visit other Kitware open-source projects at
>>> > >>> http://www.kitware.com/opensource/opensource.html
>>> > >>>
>>> > >>> Please keep messages on-topic and check the VTK FAQ at:
>>> > >>> http://www.vtk.org/Wiki/VTK_FAQ
>>> > >>>
>>> > >>> Follow this link to subscribe/unsubscribe:
>>> > >>> http://www.vtk.org/mailman/listinfo/vtkusers
>>> >
>>> > _______________________________________________
>>> > Powered by www.kitware.com
>>> >
>>> > Visit other Kitware open-source projects at
>>> > http://www.kitware.com/opensource/opensource.html
>>> >
>>> > Please keep messages on-topic and check the VTK FAQ at:
>>> > http://www.vtk.org/Wiki/VTK_FAQ
>>> >
>>> > Follow this link to subscribe/unsubscribe:
>>> > http://www.vtk.org/mailman/listinfo/vtkusers
>>> --
>>> Clinton Stimpson
>>> Elemental Technologies, Inc
>>> Computational Simulation Software, LLC
>>> www.csimsoft.com
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>>
>>
>> --
>> Jesús Spínola
>>
>>
>>
>
>
> --
> Jesús Spínola
>



-- 
Jesús Spínola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130304/b85f5bbf/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixAEROIssue_WindowsVistaAndAbove.patch
Type: application/octet-stream
Size: 1674 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130304/b85f5bbf/attachment.obj>


More information about the vtkusers mailing list