Desktop Window Manager

(Redirected from Desktop Composition Engine)
Desktop Window Manager
Component of Microsoft Windows
Windows 7 aero theme.png
Windows Aero in Windows 7 build 7600.16385, showing the abilities of DWM
Introduced inWindows Longhorn build 3683

The Desktop Window Manager (in early Longhorn builds known as Desktop Compositing Engine) is a software component of Microsoft Windows. It is used to render UI elements, animations, and visual effects (such as desktop star effects in build 4066 and 4074 and Windows Aero transparency and animations in Windows Vista and Windows 7). By default, the rendering pipeline will use the system's GPU if possible (through the DirectX API), but starting from Windows 8 build 7880, it will also render using a software-based 3D rasterizer when such an accelerator is unavailable.

History[edit | edit source]

Desktop Compositing Engine[edit | edit source]

The Desktop Compositing Engine is first present starting with build 3683, but in a buggy state that only renders window transparency. Starting from build 3706 through build 4005, a new twirling effect when minimizing or closing windows is added, and a user interface was included to allow the user to enable DCE on boot or via dynamic control.

Throughout Milestone 5, Lab06 builds such as build 4015 and build 4018 were known to have additional DCE effects, including graphical animations and flapping windows while dragging. Despite these animations, other labs used only window transparency effects. Also during Milestone 5, the Desktop Compositing Engine was reworked to enable DCE window frames, which would be the forerunner to the Windows Aero theme. However, builds 4029 through 4033 have a bug in the DCE which causes it to not enable the Direct3D shaders (which DCE window frames rely on). The bug wasn't fixed until build 4038, which was the first M6 build to have a working render DCE window frames.

Desktop Window Manager[edit | edit source]

The original composition engine would be overhauled throughout Milestone 7 of the Longhorn project, intended to now run the true Windows Aero theme when enabled, although the available builds in this milestone only had basic DCE effects which resembled that of Aero. It would be heavily rewritten for build 4088 to build 4093 in .NET managed code that was intended to run as a service, which also allowed software rendering to run on the standard VGA driver.

After development of Longhorn was reset, the Desktop Window Manager utilized from the pre-reset builds were fully scrapped for a new, stabler native implementation that could now truly render the Aero theme as intended. Support for allowing Desktop Window Manager to run on XDDM drivers was dropped early in development, with builds starting from build 5098 only allowing DWM to run if a supported LDDM/WDDM driver was installed.

By Windows 8, Desktop Window Manager now runs at all times for the Start Screen interface, with it being impossible to disable under normal circumstances. Additionally, the effects of Desktop Window Manager were able to be software-rendered starting with build 7880 instead of relying on hardware acceleration.

Enabling the Desktop Compositing Engine[edit | edit source]

It is to be noted that a compatible Direct3D graphics driver with hardware acceleration has to be installed and running properly prior to starting Desktop Compositing Engine; otherwise, either nothing happens or the desktop compositor will either crash or produce major graphical artifacts.[1] On some builds, the VMware graphics stack has a bug where there is no alpha masking or multiply support when DCE is enabled.

DCE in build 3683

Windows Longhorn build 3683[edit | edit source]

There is no user interface to enable DCE in this build. To enable DCE, add the following registry key and reboot:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DesktopComposition]
"StartupOptions"=dword:00000001

StartupOptions can be set to 0 to disable DCE, 1 to enable it on startup, and 2 to allow dynamic control via the rundll32 user32.dll,StartDCE and rundll32 user32.dll,StopDCE commands.

DCE in this build doesn't render the desktop background (although the background can still be seen via the sidebar), is extremely unstable, usually displaying major artifacts on screen or completely freezing after a couple of minutes. It is only known to work on real hardware, as most virtualizers, like VMware, cause a bugcheck immediately upon starting.

Milestone 3 / 4 builds[edit | edit source]

This applies to build 3706 up to build 4005. Builds in this era contain an updated version of DCE, containing close and minimize animations. The minimize animations fades away while spinning into the taskbar, while the closing animations fades away while twirling around. DCE can be enabled by opening Display Properties, clicking Advanced and setting the DCE setting to either enable on startup or enable via dynamic control.

DCE in these builds only renders the graphics on the hardware layer, while the software layer is rendered as black or leftover data, which means that attempting to use software capturing methods (such as Print Screen) will not produce the screen correctly. Most hypervisors, including VMware versions higher than 6.5.x will only render the software layer, resulting in a black screen upon starting DCE.

The Desktop Composition Engine in Longhorn build 3706. Unique features such as translucency and animated effects for specific actions like minimizing and closing a window are exhibited here.

Milestone 5 builds[edit | edit source]

This applies to build 4011 up to build 4020.

DCE can be enabled via the rundll32 uxdesk.dll,DCEStart command and disabled via rundll32 uxdesk.dll,DCEStop. Alternatively, after importing the following registry file and rebooting, DCE can be enabled in the same way that it was used in Milestone 3 / 4 builds:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Desktop\CompositingEngine]
"EnableShellUI"=dword:00000001 
"Startup"=dword:00000002

DCE is mostly identical to the Milestone 3 / 4 DCE, however without any animations. Unlike Milestone 3 / 4 builds however, DCE can properly render the software layer and will work on a hypervisor.

This is also the first version of DCE that can render an early version of the glass borders, which would later be seen in future builds. Enabling these glass borders requires a patched dce.dll file on builds 4015 & 4017, and a patch in the registry for build 4020.

Alpha transparency and Glass borders in Longhorn build 4015 (main).

Milestone 6 builds[edit | edit source]

Glass frames in build 4038

This applies to build 4038 up to build 4042 (Lab06_n).

DCE can be started or stopped by executing sbctl start or sbctl stop in the C:\Windows\i386 directory.

By default, DCE loads opaque Metal frames, but Glass frames can be enabled. See Windows Aero#Windows Longhorn build 4038 to build 4042 (Lab06_n) for instructions on enabling glass borders.

Gallery[edit | edit source]

See also[edit | edit source]

References[edit | edit source]