[Qt-interest] OpenGL & Vista without desktop composition bug !!!

Kim Kalland kim.kalland at nokia.com
Wed Oct 28 17:16:58 CET 2009


Vincent LEFORT wrote:
> Hello,
> 
> We can see a problem under OpenGL with Qt when we run our program (or qt 
> demo) on Vista when the Aero Theme (desktop compositing) is disabled.
> 
> _How to do : _
>  - Launch for example the demo 2D painting.
>  - Move a window above the opengl widget.
>  - Alt+tab to get back the opengl application.
> 
> => The opengl widget only refresh the region which was hidden by the 
> other window.
> 
> This problem appear with some other GUI libraries (like freeGlut 
> or wxWidget <http://trac.wxwidgets.org/ticket/10168>) but not on win32 
> based application.
> The problem does neither appear when dektop composition is enabled under 
> windows vista nor when the application is launched under windows xp so 
> without any hardware accelerated window rendering.
> 
> You can see in attachment a screen shot of the problem.
> 
> Do you know any trick to fix this problem ?
> 
> Best regards.
> 
> Vincent.
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 

I worked on a similar bug a while ago. I couldn't find a solution to the 
bug, and since the bug appears in several GUI libraries, I am tempted to 
conclude that this is a Windows bug. However, I found a workaround that 
you can try: Call SetWindowRgn(widget.winId(), 0, FALSE) before painting.


Kim



More information about the Qt-interest-old mailing list