Title

Message

Confirm

Compatibility issue with SetWindowDisplayAffinity function

ral1sh
53 discussion posts
EDIT: Is there a way to add line breaks? Because if there is, I can't find it. Apologies for the difficult to read text as a result.
Here's a weird one for the development team
There appears to be a compatibility issue with the SetWindowDisplayAffinity function when using the
WDA_MONITOR
display affinity. I haven't tested the more recent
WDA_EXCLUDEFROMCAPTURE
setting. The issue manifests in certain UI elements not being correctly drawn after resizing a window using DisplayFusion functionality.
I'm guessing the issue may be the internal implementation of DisplayFusion's window resizing results in the window being moved "off display", at least from the point-of-view of certain Windows APIs. It's possible this is a bug in Windows itself, but I've only reproduced it in conjunction with DisplayFusion to date. Some reproduction steps follow using KeePass as an example.
Start by installing KeePass then browse to the installation directory and create a file named KeePass.config.enforced.xml. Set the file content to:

Code


This enables the advanced feature to prevent the KeePass window from being captured in a screen shot or video recording (it's not available via the user interface currently). Internally, it's simply calling the SetWindowDisplayAffinity function with the
WDA_MONITOR
value.
Now start KeePass and use DisplayFusion's "Move Window to Centre of Monitor and Size to 75%" function. Other's may demonstrate the same issue, but that's the one I regularly use. The Quick Search box near the top of the window will be blacked-out after invoking the function, and will remain blacked-out if you use additional native Windows management hotkeys (e.g. snap window to left or right via Windows Key + Left/Right arrow). Hovering the mouse over the Quick Search box appears to resolve the issue, though I have seen artifacts manifest afterwards without having executed the DisplayFusion function again.
This is realistically a minor issue, but it's been a bugbear for months I've kept been meaning to report. As always, keep up the great work!
Nov 1, 2021 (modified Nov 1, 2021)  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

Thanks for the writeup, we we're able to reproduce the issue on our end, so we've added it to our list to look into.

Thanks!
Nov 5, 2021  • #2
Was this helpful?  (1)  (-)