mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-08 15:18:05 +03:00
guard by feature flag
This commit is contained in:
committed by
Ferdinand Schober
parent
93618a5425
commit
5881ecda4b
25
Cargo.lock
generated
25
Cargo.lock
generated
@@ -1078,6 +1078,30 @@ dependencies = [
|
|||||||
"system-deps",
|
"system-deps",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gdk4-wayland"
|
||||||
|
version = "0.9.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bd34518488cd624a85e75e82540bc24c72cfeb0aea6bad7faed683ca3977dba0"
|
||||||
|
dependencies = [
|
||||||
|
"gdk4",
|
||||||
|
"gdk4-wayland-sys",
|
||||||
|
"gio",
|
||||||
|
"glib",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gdk4-wayland-sys"
|
||||||
|
version = "0.9.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7c7a0f2332c531d62ee3f14f5e839ac1abac59e9b052adf1495124c00d89a34b"
|
||||||
|
dependencies = [
|
||||||
|
"glib-sys",
|
||||||
|
"libc",
|
||||||
|
"system-deps",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "generic-array"
|
name = "generic-array"
|
||||||
version = "0.14.7"
|
version = "0.14.7"
|
||||||
@@ -1837,6 +1861,7 @@ name = "lan-mouse-gtk"
|
|||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel",
|
"async-channel",
|
||||||
|
"gdk4-wayland",
|
||||||
"glib-build-tools",
|
"glib-build-tools",
|
||||||
"gtk4",
|
"gtk4",
|
||||||
"hostname",
|
"hostname",
|
||||||
|
|||||||
@@ -8,14 +8,20 @@ repository = "https://github.com/feschber/lan-mouse"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
gtk = { package = "gtk4", version = "0.9.0", features = ["v4_2"] }
|
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"] }
|
adw = { package = "libadwaita", version = "0.7.0", features = ["v1_1"] }
|
||||||
async-channel = { version = "2.1.1" }
|
async-channel = { version = "2.1.1" }
|
||||||
hostname = "0.4.0"
|
hostname = "0.4.0"
|
||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
lan-mouse-ipc = { path = "../lan-mouse-ipc", version = "0.2.0" }
|
lan-mouse-ipc = { path = "../lan-mouse-ipc", version = "0.2.0" }
|
||||||
thiserror = "2.0.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]
|
[build-dependencies]
|
||||||
glib-build-tools = { version = "0.20.0" }
|
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::client_object::ClientObject;
|
||||||
use self::key_object::KeyObject;
|
use self::key_object::KeyObject;
|
||||||
|
|
||||||
|
#[cfg(all(unix, feature = "wayland_window_identifier", not(target_os = "macos")))]
|
||||||
use gdk4_wayland::WaylandToplevel;
|
use gdk4_wayland::WaylandToplevel;
|
||||||
|
|
||||||
use thiserror::Error;
|
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
|
// 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.
|
// windows on top of it using xdg-foreign.
|
||||||
|
#[cfg(all(unix, feature = "wayland_window_identifier", not(target_os = "macos")))]
|
||||||
window.connect_show(|window| {
|
window.connect_show(|window| {
|
||||||
// needs the surface so we have to present first!
|
// needs the surface so we have to present first!
|
||||||
if let Some(surface) = window.surface() {
|
if let Some(surface) = window.surface() {
|
||||||
|
|||||||
Reference in New Issue
Block a user