-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Always on bottom #522
Always on bottom #522
Conversation
d93ed90
to
c80cb8f
Compare
15cebc4
to
b2430ae
Compare
b2430ae
to
d7c5965
Compare
5c69eb3
to
56f308d
Compare
16fc314
to
2e74c58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, the implementation for Linux and Windows LGTM but I will leave macOS for @wusyong to approve. There is a couple of nit-picks but this should be mostly good to go.
df0af02
to
03c349b
Compare
Co-Authored-By: Amr Bashir <amr.bashir2015@gmail.com>
03c349b
to
3f4feba
Compare
Co-Authored-By: Amr Bashir <amr.bashir2015@gmail.com>
42df186
to
a563d89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
@henry40408 This is great. Although I'm noticing on Windows when clicking the 'Show Desktop' button, the window still gets hidden annoyingly. Any ideas? |
hi @jabza I just tested and confirmed that window is always hidden whichever I set it "always on top" or "always on bottom", so it might not relate to "always on bottom" or "always on top". Would you kindly open another issue? |
@jabza this is a normal behavior of Windows. Nothing we can control. I think what you want is to make your tauri window behave like a desktop wallpaper? in this case check out my comment here tauri-apps/tauri#4261 (comment) |
@henry40408 @amrbashir I see. For now I guess the wallpaper/progman child approach seems like the only way to remain visible upon 'Show Desktop'. Windows 11 is re-introducing the concept of Window 'widgets' which will be interesting to see how that changes things. I also tried OR'ing in the NOZORDER flag and pretty much everything else I could find on the topic. It seems like perhaps this used to be possible but not any more. |
@jabza Windows has no concept of "always on bottom", but you can change the z-order of the window to be the bottom most but that can be changed later due to many factors. The only way you can be truly on bottom is by using wallpaper/progman approach. Also the "Show Desktop" button hides all windows to show the destkop and since an "always on bottom" window is still a window, it makes sense for it to be hidden. |
@amrbashir understood, but it is possible for windows to 'survive' "Show Desktop", assuming they're "always on top". I guess that's the one exception Windows makes. Thanks for the alternative solution, i'll go ahead and attempt a plugin! |
even "Always on top" can't survive "Show desktop" because "Always on top" guarantees it is on top of everything else but it doesn't guarantee that it can't be hidden or minimized. |
I've tested it locally with Always on Top set and it does survive the event for me |
That's interesting behavior that I didn't know about it but unfortunately Windows doesn't guarantee the same for "always on bottom". |
All good, your alternative solution looks to be the ticket :) Hopefully come Windows 11 update a cleaner way will present itself! |
What you want to do is probably similar to Rainmeter, so you could try looking into their source code and see if you can find anything related there. |
Wow this is interesting... https://github.com/rainmeter/rainmeter/blob/78a24859aa2aafd69e819619eb9bbf44b77d2bd3/Library/System.cpp they seem to be using a 'dummy window' to detect the 'Show Desktop' event... there's some gems in here I'm sure... |
yeah Rainmeter has been around for a while and I bet they have a lot of experience/knowledge in this area. |
closes #113
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
Linux
I'd like to implementis_always_below_bottom
andis_always_on_top
as well but there is a long-living upstream bug in GTK https://gitlab.gnome.org/GNOME/gtk/-/issues/682Windows
might help for implementation https://stackoverflow.com/a/65052538