flutter_acrylic icon indicating copy to clipboard operation
flutter_acrylic copied to clipboard

Fix Windows 11 Acrylic effect Title Bar bug

Open Auties00 opened this issue 1 year ago • 2 comments

After setting the acrylic effect on Windows 11 with the following code:

    await Window.setEffect(
      effect: WindowEffect.acrylic,
      color: Colors.transparent,
      dark: true
    );

Currently, the Window looks like this when focused: Screenshot (24)

With my fix, it looks like this: Screenshot (23)

This behaviour is coherent with the native behaviour, for example in the Settings app: Screenshot (25)

I also created an enum for the DWMWINDOWATTRIBUTE values that the library needs.

Auties00 avatar Sep 08 '23 18:09 Auties00

@alexmercerind Can you test this PR on your machine? I don’t have access to a Windows 11 machine.

Adrian-Samoticha avatar Sep 08 '23 19:09 Adrian-Samoticha

Any chance this could be merged?

Auties00 avatar May 06 '24 13:05 Auties00

Alright, it seems that @alexmercerind isn’t really active these days (at least on this project), so maybe I’ll just merge and publish it anyway. @Auties00, have you checked that your fix doesn’t introduce any regressions on Windows 10?

Adrian-Samoticha avatar May 14 '24 12:05 Adrian-Samoticha

Alright, it seems that @alexmercerind isn’t really active these days (at least on this project), so maybe I’ll just merge and publish it anyway. @Auties00, have you checked that your fix doesn’t introduce any regressions on Windows 10?

I've checked that and it doesn't cause any issues, yet I've noticed yesterday that if you have a WinSDK that defines the enumeration i added it will go in conflict. I'll push a fix for that

Auties00 avatar May 14 '24 14:05 Auties00

Alright, it seems that @alexmercerind isn’t really active these days (at least on this project), so maybe I’ll just merge and publish it anyway. @Auties00, have you checked that your fix doesn’t introduce any regressions on Windows 10?

I've checked that and it doesn't cause any issues, yet I've noticed yesterday that if you have a WinSDK that defines the enumeration i added it will go in conflict. I'll push a fix for that

ive tested and it works for me, not that a random on the internet can be any justification for merging it. but its a +1 from me

NextdoorPsycho avatar May 21 '24 06:05 NextdoorPsycho