is there a way to get x11 window id from rust backend #9709
Answered
by
tronical
moolight-seashell
asked this question in
Q&A
-
|
everything is in the title, Is there a “clean” way to retrieve the x11 id of a slint window ? fn gui_thread(tx: Sender<GuiMessages>, weak_tx : Sender<slint::Weak<MyApp>>) {
let ui = MyApp::new().unwrap();
let ui_weak = ui.as_weak();
// send a gui reference to the main thread
weak_tx.send(ui_weak.clone()).unwrap();
// get and send x11 id to the main thread
// [...]
ui.run().unwrap(); // blocking call
} |
Beta Was this translation helpful? Give feedback.
Answered by
tronical
Oct 12, 2025
Replies: 1 comment
-
|
You can await the winit window with the API below and then access the raw window handle: https://docs.slint.dev/latest/docs/rust/slint/winit_030/trait.WinitWindowAccessor#tymethod.winit_window |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
moolight-seashell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can await the winit window with the API below and then access the raw window handle: https://docs.slint.dev/latest/docs/rust/slint/winit_030/trait.WinitWindowAccessor#tymethod.winit_window