fix: linux-specific build

This commit is contained in:
eneller
2025-11-28 14:06:57 +01:00
parent 6ae34369b4
commit 6c4235a52f
2 changed files with 2 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ tauri-plugin-opener = "2"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
enigo = "0.6.1" enigo = "0.6.1"
[target.'cfg(target_os = "linux")'.dependencies]
x11 = { version = "2.21.0", features = ["xlib"] } x11 = { version = "2.21.0", features = ["xlib"] }
raw-window-handle = "0.6.2" raw-window-handle = "0.6.2"

View File

@@ -1,5 +1,4 @@
use enigo::{Direction::Click, Enigo, Key, Keyboard, Settings}; use enigo::{Direction::Click, Enigo, Key, Keyboard, Settings};
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle, WindowHandle};
use std::ptr; use std::ptr;
use tauri::Manager; use tauri::Manager;
@@ -19,6 +18,7 @@ pub fn run() {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
{ {
use x11::xlib; use x11::xlib;
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle, WindowHandle};
// raw X11 pointers here // raw X11 pointers here
unsafe { unsafe {
let handle = window.raw_window_handle(); let handle = window.raw_window_handle();