Why do some applications disable Windows Aero?
If you're using a recent build of Windows Vista, you may have noticed that some applications cause a dialog box to pop up which disables desktop composition when they start up.
Here’s why this happens: one of the key aspects of desktop composition is that applications never render to the front-buffer directly, instead they render to redirection surfaces in software (for GDI applications) or shared surfaces (for DX applications), which are then in turn composed to the desktop by the DWM. But if an application needs to lock the front buffer (for read-back, or some other purpose), it can do so, but that will result in disabling desktop composition. In most cases, this is OK, because the application is drawing to the entire area of the display (as is the case with full-screen games, or watching a video in full-screen mode). Unfortunately, sometimes this also happens with applications that run in windows (vs. full screen) and in those situations the DWM shuts down.
Real-world examples of when you might see this are Apple's QuickTime Player & iTunes software. When they start up, they use DirectDraw to get access to the front buffer, even though they aren’t full-screen applications. Luckily – you can work around this! Here’s how:
- Open Quicktime preferences by selecting “Preferences” and then “QuickTime Preferences…” from the “Edit” menu in the QuickTime player application. A dialog box will pop up, with the title: “Quicktime Settings”.
- Select the “Advanced” tab in this dialog, and in the third section from the top, called “Video” select “Safe Mode (GDI Only)”
- Close the QuickTime player, and exit the QuickTime system tray application as well
The next time you start iTunes or QuickTime, it will use GDI to present its content instead of DirectDraw, which will work in a way that is more compatible with desktop composition. Most other applications that use DirectDraw have a fallback path to use GDI that you can find if you look in the options for the application itself.
So if you have a an application that uses DirectDraw and you don't want Aero to disable when your application is in use, the best way to do this is to adjust your code so that you're sticking to using DirectDraw's Blt methods (Blt, BltFast, etc.) to get your data into your sufraces, and make sure that you're not calling Lock or GetDC on those surfaces at any time, as these are the methods that will cause Windows to shut down composition.
Another thing to consider is using the methods in dwmapi.h to detect if composition is enabled, and automatically fall back to your GDI codepaths when starting up if you are not in a position to refactor your DirectDraw code.
Comments
Anonymous
June 03, 2006
Back in February, I posted about some compatibility issues various applications may have with Aero, and...Anonymous
October 03, 2006
There was a forum discussion on javalobby that said, "Running Java on Vista Disabled Aero/Glass UI Effects",Anonymous
October 03, 2006
PingBack from http://blog.dotnet-paderborn.de/2006/10/04/Java+Vista+Und+Aero+Glass.aspxAnonymous
November 27, 2006
PingBack from http://www.itwriting.com/blog/?p=61Anonymous
March 06, 2007
PingBack from http://strugglingwriter.wordpress.com/2007/03/06/windows-vista-windows-aero-disabled/Anonymous
May 02, 2007
PingBack from http://soci.hu/blog/index.php/2007/05/02/why-do-some-applications-disable-windows-aero/Anonymous
August 21, 2007
PingBack from http://www.nerdzapper.com/81/windows-aero-disabled/Anonymous
November 26, 2007
PingBack from http://www.technipages.com/wp/itunes-and-quicktime-disables-aero.htmlAnonymous
June 13, 2008
PingBack from http://derrick.digitalvideodomain.com/windowsaero.htmlAnonymous
January 21, 2009
PingBack from http://www.keyongtech.com/3001102-application-keeps-sending-request-toAnonymous
March 06, 2009
PingBack from http://www.itechtalk.com/thread2948.html#post5021