mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 11:59:59 +03:00
guard by feature flag
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1946,7 +1946,6 @@ dependencies = [
|
||||
"libadwaita",
|
||||
"log",
|
||||
"thiserror 2.0.12",
|
||||
"wayland-client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -8,14 +8,20 @@ repository = "https://github.com/feschber/lan-mouse"
|
||||
|
||||
[dependencies]
|
||||
gtk = { package = "gtk4", version = "0.9.0", features = ["v4_2"] }
|
||||
gdk4_wayland = { package = "gdk4-wayland", version="0.9.6" }
|
||||
adw = { package = "libadwaita", version = "0.7.0", features = ["v1_1"] }
|
||||
async-channel = { version = "2.1.1" }
|
||||
hostname = "0.4.0"
|
||||
log = "0.4.20"
|
||||
lan-mouse-ipc = { path = "../lan-mouse-ipc", version = "0.2.0" }
|
||||
thiserror = "2.0.0"
|
||||
wayland-client = "0.31.12"
|
||||
|
||||
[target.'cfg(all(unix, not(target_os="macos")))'.dependencies]
|
||||
gdk4_wayland = { package = "gdk4-wayland", version="0.9.6", optional=true }
|
||||
|
||||
[build-dependencies]
|
||||
glib-build-tools = { version = "0.20.0" }
|
||||
|
||||
|
||||
[features]
|
||||
default = ["wayland_window_identifier"]
|
||||
wayland_window_identifier = ["dep:gdk4_wayland"]
|
||||
|
||||
@@ -19,6 +19,7 @@ use gtk::{gio, glib, prelude::ApplicationExt};
|
||||
use self::client_object::ClientObject;
|
||||
use self::key_object::KeyObject;
|
||||
|
||||
#[cfg(all(unix, feature = "wayland_window_identifier", not(target_os = "macos")))]
|
||||
use gdk4_wayland::WaylandToplevel;
|
||||
|
||||
use thiserror::Error;
|
||||
@@ -128,6 +129,7 @@ fn build_ui(app: &Application) {
|
||||
|
||||
// export TopLevel handle and send it to the service so that it can put the InpuCapture / RemoteDesktop
|
||||
// windows on top of it using xdg-foreign.
|
||||
#[cfg(all(unix, feature = "wayland_window_identifier", not(target_os = "macos")))]
|
||||
window.connect_show(|window| {
|
||||
// needs the surface so we have to present first!
|
||||
if let Some(surface) = window.surface() {
|
||||
|
||||
Reference in New Issue
Block a user