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

apply_acrylic does not display properly in windows 22H2 #75

Closed
hanmingk opened this issue Dec 5, 2022 · 1 comment
Closed

apply_acrylic does not display properly in windows 22H2 #75

hanmingk opened this issue Dec 5, 2022 · 1 comment

Comments

@hanmingk
Copy link

hanmingk commented Dec 5, 2022

I tried using this in fltk-rs.
Seems to work only for the menu bar.
I have tried it on windows 22H1 and it is displayed normally.
But this will not work properly in windows 22H2.

# Cargo.toml
[package]
name = "fltk-acrylic"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
fltk = { version = "1.3.22", features = ["rwh05"] }
window-vibrancy = "0.3"
# main.rs
use fltk::{prelude::*, *};
use window_vibrancy::apply_acrylic;

fn main() {
    let a = app::App::default().with_scheme(app::Scheme::Gtk);
    let mut win = window::Window::default().with_size(400, 400);
    win.end();
    win.show();

    apply_acrylic(&win, Some((10, 10, 10, 90))).expect("Unsupported");
    a.run().unwrap();
}

image

@amrbashir
Copy link
Member

Are you sure the window is transparent? you need to make sure the window is transparent. for example, try cloning this repo and running:

cargo r --example winit
cargo r --example tao

you can see that in the first example, the window is not transparent, due to a bug in winit but you can see that the effect works fine in tao.

The reason why it worked in 22H1 because we use a different API there which has a lag issues when resizing/moving.

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants