Skip to content

Commit

Permalink
x11: Implement image transfer using the MIT-SHM extension (#46)
Browse files Browse the repository at this point in the history
* Implement shared memory transfer for X11

* Change to x11rb

* Fix leak + review from psychon

* Add waits to prevent illegal writes to SHM

* @ids1024 code review
  • Loading branch information
notgull authored Jan 6, 2023
1 parent 0f1effe commit a6042f6
Show file tree
Hide file tree
Showing 2 changed files with 392 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.60.0"
default = ["x11", "wayland", "wayland-dlopen"]
wayland = ["wayland-backend", "wayland-client", "nix", "fastrand"]
wayland-dlopen = ["wayland-sys/dlopen"]
x11 = ["bytemuck", "x11rb", "x11-dl"]
x11 = ["bytemuck", "nix", "x11rb", "x11-dl"]

[dependencies]
log = "0.4.17"
Expand All @@ -30,7 +30,7 @@ wayland-backend = { version = "0.1.0", features = ["client_system"], optional =
wayland-client = { version = "0.30.0", optional = true }
wayland-sys = "0.30.0"
x11-dl = { version = "2.19.1", optional = true }
x11rb = { version = "0.11.0", features = ["allow-unsafe-code", "dl-libxcb"], optional = true }
x11rb = { version = "0.11.0", features = ["allow-unsafe-code", "dl-libxcb", "shm"], optional = true }

[target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox", target_os = "linux", target_os = "freebsd"))))'.dependencies]
fastrand = { version = "1.8.0", optional = true }
Expand Down
Loading

0 comments on commit a6042f6

Please sign in to comment.