floem
floem copied to clipboard
proposal: add a way to get application or window handle
Hi!
I'm trying to see if I can use this with https://github.com/tauri-apps/window-vibrancy using their winit example.
To use apply_mica
, I need the window handle from
https://github.com/lapce/floem/blob/88d6b600f3ef58713682464b95e2c6300821c55f/src/app_handle.rs#L293
to pass it in the function.
See, from example, https://github.com/tauri-apps/window-vibrancy/blob/fd1586562868a4b53816a77a25c17c0e3fa354a0/examples/winit.rs#L29
Is there any way to make it possible somehow ? Or is there already any API in the library that allows me to get the raw window ?
Thanks you!
Hi,
Do you need to use this with window vibrancy or would implementing apply_vibrancy and apply_blur work as well?
Hi, so to use apply_vibrancy and apply_blur I need to pass the window to the function.
Even if we want to implement those functions ourselves, we would still need to have access to the window ?
Except if those functions are implemented directly in the library... but not sure if that will be done because it's not something everyone needs I guess (?)
Looking into this, it looks like window handles are handled by a fork of winit, meaning Tauri's window vibrancy would probably need to be re-implemented within Floem's codebase to use Lapce's fork. It doesn't look like a massive amount of effort, could probably be done within a few hours.
I think it's the sort of thing which has enough appetite to justify adding it to Floem. I'll have a look and see if it's something I can do this weekend.
I've started the basis for what will turn into window vibrancy. I've forked the original window vibrancy and changed it to work with Floem's version of winit. I've added this as a dependency to Floem and started creating a method to set vibrancy within a view.
I'll open a pull request to track my progress.
@Vexcited I have a fork which delivers this functionality but I'm waiting on a pull to be reviewed.