fix error
This commit is contained in:
@@ -8,6 +8,15 @@ use x11mod::{
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
// X11 reparenting requires our own window to be an X11 window. On Wayland
|
||||
// sessions, GTK defaults to the Wayland backend and embedding is impossible.
|
||||
// Force the X11 backend (via XWayland on Wayland sessions) so we always get
|
||||
// an X11 toplevel we can reparent into.
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
std::env::set_var("GDK_BACKEND", "x11");
|
||||
}
|
||||
|
||||
tauri::Builder::default()
|
||||
.manage(PtyState::default())
|
||||
.manage(X11State::new())
|
||||
|
||||
Reference in New Issue
Block a user