Skip to content

Commit

Permalink
Update SCTK to 0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccombs committed Feb 26, 2024
1 parent ce6c5c7 commit 48ddb19
Show file tree
Hide file tree
Showing 10 changed files with 299 additions and 378 deletions.
98 changes: 54 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ k9 = "0.11.0"
gl_generator = "0.14"

[features]
wayland = ["wayland-client", "smithay-client-toolkit", "wayland-egl", "wayland-protocols"]
wayland = ["wayland-client", "smithay-client-toolkit", "wayland-egl", "wayland-protocols", "wayland-csd-frame"]

[dependencies]
async-channel = "1.6"
Expand Down Expand Up @@ -81,10 +81,11 @@ xcb-imdkit = { version="0.3", git="https://github.com/wez/xcb-imdkit-rs.git", re
zbus = "3.14"
zvariant = "3.15"

smithay-client-toolkit = {version = "0.17.0", default-features=false, optional=true}
wayland-protocols = {version="0.30", optional=true}
wayland-client = {version="0.30", optional=true}
wayland-egl = {version="0.30", optional=true}
smithay-client-toolkit = {version = "0.18.1", default-features=false, optional=true}
wayland-protocols = {version="0.31", optional=true}
wayland-client = {version="0.31", optional=true}
wayland-egl = {version="0.32", optional=true}
wayland-csd-frame = { version = "0.3.0", optional = true}

[target.'cfg(target_os="macos")'.dependencies]
cocoa = "0.25"
Expand Down
8 changes: 6 additions & 2 deletions window/src/os/wayland/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ impl WaylandConnection {
let mut events = Events::with_capacity(8);

let wl_fd = {
let read_guard = self.event_queue.borrow().prepare_read()?;
let read_guard = self
.event_queue
.borrow()
.prepare_read()
.ok_or_else(|| anyhow::anyhow!("Failed to preapre event queue"))?;
read_guard.connection_fd().as_raw_fd()
};

Expand Down Expand Up @@ -100,7 +104,7 @@ impl WaylandConnection {
continue;
}

if let Ok(guard) = event_q.prepare_read() {
if let Some(guard) = event_q.prepare_read() {
if let Err(err) = guard.read() {
log::trace!("Event Q error: {:?}", err);
if let WaylandError::Protocol(perr) = err {
Expand Down
Loading

0 comments on commit 48ddb19

Please sign in to comment.