Skip to content

qt: Add acrylic effect on windows 10

Prince Gupta requested to merge jagannatharjun/vlc:acrylic-final into master

This MR adds acrylic effect on parts of VLC 4 UI on windows.

Working:
The current implementation uses windows private API (lDwmpCreateSharedMultiWindowVisual) to create IDCompositionVisual of the whole screen. This creates the visual of all windows except for desktop. I use another private API (lDwmpCreateSharedThumbnailVisual) to create IDCompositionVisual for the desktop. Both of these visuals are combined with a blur effect over them to produce acrylic blur effect. The private APIs are described here

One problem with this approach is that you need to disable the taskbar preview in the main window. This is bypassed by using a "cloaked" dummy window and using it as a target in private APIs. Generated visual seems to work fine when combined with dcompdevice for the main window.

Known Problem(s):
Desktop icons are missing in the blur.

Result:
image

Another Approach (https://code.videolan.org/jagannatharjun/vlc/-/commits/acrylic-windows-compose-multi-window):
Uses (lDwmpCreateSharedThumbnailVisual) to create visuals for all top-level windows, combine them in one visual with blur effect. This works well enough and also doesn't have "missing desktop icons problem", the downside being there are more moving parts in this implementation.

TODO:

  • write description
  • Test on Windows 10 pre iron
  • Test on Windows 11
  • add settings to disable acrylic background (do it in separate MR?)
  • other...
Edited by Prince Gupta

Merge request reports