Skip to content

Commit

Permalink
Merge pull request #149 from rust-windowing/update-wayland
Browse files Browse the repository at this point in the history
wayland: Update to wayland-client 0.31
  • Loading branch information
ids1024 authored Sep 9, 2023
2 parents fff761c + a9d7e15 commit 36618b6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust_version: ['1.64.0', stable, nightly]
rust_version: ['1.65.0', stable, nightly]
platform:
- { target: x86_64-pc-windows-msvc, os: windows-latest, }
- { target: i686-pc-windows-msvc, os: windows-latest, }
Expand Down Expand Up @@ -79,9 +79,13 @@ jobs:
targets: ${{ matrix.platform.target }}
components: clippy, rust-src

- name: Install libwayland
if: (matrix.platform.os == 'ubuntu-latest')
run: sudo apt-get update && sudo apt-get install libwayland-dev

- name: Install GCC Multilib
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')
run: sudo apt-get update && sudo apt-get install gcc-multilib
run: sudo apt-get install gcc-multilib

- name: Build crate
shell: bash
Expand All @@ -94,7 +98,7 @@ jobs:
!contains(matrix.platform.target, 'redox') &&
!contains(matrix.platform.target, 'freebsd') &&
!contains(matrix.platform.target, 'netbsd') &&
matrix.rust_version != '1.64.0'
matrix.rust_version != '1.65.0'
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES

- name: Run tests
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://github.com/rust-windowing/softbuffer"
keywords = ["framebuffer", "windowing"]
categories = ["game-development", "graphics", "gui", "multimedia", "rendering"]
exclude = ["examples"]
rust-version = "1.64.0"
rust-version = "1.65.0"

[[bench]]
name = "buffer_mut"
Expand All @@ -36,9 +36,9 @@ drm-sys = { version = "0.4.0", default-features = false, optional = true }
memmap2 = { version = "0.7.1", optional = true }
nix = { version = "0.26.1", optional = true }
tiny-xlib = { version = "0.2.1", optional = true }
wayland-backend = { version = "0.1.0", features = ["client_system"], optional = true }
wayland-client = { version = "0.30.0", optional = true }
wayland-sys = "0.30.0"
wayland-backend = { version = "0.3.0", features = ["client_system"], optional = true }
wayland-client = { version = "0.31.0", optional = true }
wayland-sys = "0.31.0"
x11rb = { version = "0.12.0", features = ["allow-unsafe-code", "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]
Expand Down
4 changes: 2 additions & 2 deletions src/wayland/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use memmap2::MmapMut;
use std::{
ffi::CStr,
fs::File,
os::unix::prelude::{AsRawFd, FromRawFd},
os::unix::prelude::{AsFd, AsRawFd, FromRawFd},
slice,
sync::{
atomic::{AtomicBool, Ordering},
Expand Down Expand Up @@ -107,7 +107,7 @@ impl WaylandBuffer {
let map = unsafe { map_file(&tempfile) };

// Create wayland shm pool and buffer
let pool = shm.create_pool(tempfile.as_raw_fd(), pool_size, qh, ());
let pool = shm.create_pool(tempfile.as_fd(), pool_size, qh, ());
let released = Arc::new(AtomicBool::new(true));
let buffer = pool.create_buffer(
0,
Expand Down

0 comments on commit 36618b6

Please sign in to comment.