alexmercerind / flutter_acrylic

Flutter library for window acrylic, mica & transparency effects.
MIT License
595 stars 53 forks source link

macos transparency and effects only when focused #12

Closed tofutim closed 2 years ago

tofutim commented 2 years ago

Seems like the macos effects are only available when the window focused. Is there some way around this? The Mac Terminal Silver Aero does this kind of...

(I was hoping for a see-thru window)

tofutim commented 2 years ago

I guess maybe the blur is too much to give to a non-active app?

alexmercerind commented 2 years ago

Seems like the macos effects are only available when the window focused. Is there some way around this? The Mac Terminal Silver Aero does this kind of...

(I was hoping for a see-thru window)

If you are aware of any relevant configurations or APIs, feel free to contribute. I haven't worked on macOS implementation, but I believe great work is done by @ Adrian-Samoticha.

Adrian-Samoticha commented 2 years ago

Most blurry apps in macOS work this way. Granted, the Terminal does seem to be an exception to this rule. I'll look into this sometime.

Edit: Apparently this topic is very well documented here: https://developer.apple.com/documentation/appkit/nsvisualeffectview/state

It actually appears to be a very straightforward thing to implement, so I am going to assign myself.

Adrian-Samoticha commented 2 years ago

14 resolves this issue. You will be able to set the blur view state to active like so:

Window.setBlurViewState(MacOSBlurViewState.active);

This will make the window's blur effect active regardless of the window's active state.