Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows 11 Acrylic effect Title Bar bug #81

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

Auties00
Copy link
Contributor

@Auties00 Auties00 commented Sep 8, 2023

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.

Fixed Windows 11 acrylic bug
@Adrian-Samoticha
Copy link
Collaborator

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

@Auties00
Copy link
Contributor Author

Auties00 commented May 6, 2024

Any chance this could be merged?

@Adrian-Samoticha
Copy link
Collaborator

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?

@Auties00
Copy link
Contributor Author

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

@NextdoorPsycho
Copy link

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

@Adrian-Samoticha Adrian-Samoticha self-assigned this Jun 10, 2024
@Adrian-Samoticha Adrian-Samoticha added the bug Something isn't working label Jun 10, 2024
@Adrian-Samoticha Adrian-Samoticha merged commit 2434332 into alexmercerind:master Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants