Title

Message

Confirm

Want to earn a free DisplayFusion Pro license? We're looking for DisplayFusion translators!
<< DiscussionsReply

Trigger when Window loses focus

Avatar from Gravatar.com
Randomini
1 discussion post
Hi;
I want a certain window (Spotify) to automatically close/minimise when it loses focus, but in the GUI there's only a Trigger for when a window gains focus. What would be the easiest way to do this?
Thanks!
11 days ago  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Windows doesn't send a global message when an application loses focus, so it's not possible to add as a Trigger event.

You could have a Window Focused Trigger that uses *.* as the application, and runs a Scripted Function that does this:
  • Check if window that got focus was Spotify
  • If not, check if Spotify is visible
  • If so, minimize Spotify

That would be a bit resource intensive though, since it would have to run through that script every time a different window gets focus.
8 days ago  • #2
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply