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

window vibrancy feature #137

Closed
samirdjelal opened this issue Jul 19, 2021 · 10 comments
Closed

window vibrancy feature #137

samirdjelal opened this issue Jul 19, 2021 · 10 comments

Comments

@samirdjelal
Copy link

it will be great to see window vibrancy feature in Tauri
Here is some examples that made in electron

https://github.com/arkenthera/electron-vibrancy
https://github.com/Seo-Rii/electron-acrylic-window/blob/master/src/native/win10.cpp

image
image

@lemarier
Copy link
Member

@amrbashir
Copy link
Member

amrbashir commented Jul 19, 2021

On Linux, transparency/blur is usually used by the user compositor and we can't control that, however I think I've seen some apps before that use clever tricks to workaround this (I need to do more research). There is also some news about gtk4 has some blur effect but since I haven't tried it at all, it might not be the expected behavior.
IMO I don't think we should support Linux for this, too much work and users can easily configure their compositer.

On Windows:

  • win7 supports blur only (DWMEnableBlurBehind).
  • win8 doesn't support any blur method, not to my knowledge at least.
  • win10 supports blur on all versions I think without any problems. It also supports acrylic but only on win10 v1809+ and it will have lags when resizing/moving the window (SetWindowCompositionAttribute).
  • win11 is the same as win10 but also supports mica (DwmSetWindowAttribute).

@wusyong
Copy link
Member

wusyong commented Jul 21, 2021

I'm going to upgrade to gtk4 and see how it goes?
If that works well, maybe we could add this later.

@Tropix126
Copy link

Note that Windows 11 also has undocumented APIs for enabling the new Mica blur effects as well.

@amrbashir
Copy link
Member

amrbashir commented Oct 24, 2021

@Tropix126 is it SetWindowCompositionAttribute or something else ?

Edit: According to this comment, seems like there is a new variant in dwmapi.h that can be used with DwmSetWindowAttribute but it is still in preview sdk and not stable.

@amrbashir
Copy link
Member

amrbashir commented Dec 6, 2021

for anyone interested in this issue, I made a https://github.com/tauri-apps/window-vibrancy to experiment with the feature. it supports tao and tauri and I'd appreciate feedback on different Windows versions, macOS support will be added later.

Edit: macOS is now supported.

@Tropix126
Copy link

The lastest insider build of Windows 11 (22523) just got public facing Win32 APIs for Mica and Acrylic composition effects respectively under DWMWA_SYSTEMBACKDROP_TYPE:
https://twitter.com/StartIsBack/status/1471262840313065474/

@amrbashir
Copy link
Member

Closing this as https://github.com/tauri-apps/window-vibrancy is enough and will try to include it in tauri@v2 by default.

@developomp
Copy link

Closing this as https://github.com/tauri-apps/window-vibrancy is enough and will try to include it in tauri@v2 by default.

Hopefully with Linux support?

@FabianLars
Copy link
Member

Hopefully with Linux support?

To our knowledge the note in the readme is still accurate, at least if we don't want to force users to install gnome extensions. We'd love to be proven wrong about that though, so if you know something we don't, please reach out to us!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants