Skip to content

Commit 1530a59

Browse files
committed
upgrade: waynest
1 parent 4af17c2 commit 1530a59

File tree

10 files changed

+40
-16
lines changed

10 files changed

+40
-16
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ tempfile = "3.10"
9393

9494
# wayland
9595
cluFlock = { version = "1.2.7", optional = true } # for the lockfile checking
96-
waynest = { git = "https://github.com/technobaboo/waynest.git", features = [
96+
waynest = { git = "https://github.com/verdiwm/waynest.git", features = [
9797
"server",
9898
"stable",
9999
], default-features = false, optional = true }

src/wayland/core/buffer.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use stereokit_rust::{
99
};
1010
pub use waynest::server::protocol::core::wayland::wl_buffer::*;
1111
use waynest::{
12-
server::{Dispatcher, Result, protocol::core::wayland::wl_shm::Format},
12+
server::{Client, Dispatcher, Result, protocol::core::wayland::wl_shm::Format},
1313
wire::ObjectId,
1414
};
1515

@@ -75,7 +75,7 @@ impl Buffer {
7575
let color = Color32 {
7676
r: map_lock[cursor + 2], // Red is byte 2
7777
g: map_lock[cursor + 1], // Green is byte 1
78-
b: map_lock[cursor + 0], // Blue is byte 0
78+
b: map_lock[cursor], // Blue is byte 0
7979
a: match self.format {
8080
Format::Xrgb8888 => 255, // X means ignore alpha, treat as fully opaque
8181
Format::Argb8888 => map_lock[cursor + 3], // Use alpha from byte 3 for ARGB
@@ -96,4 +96,8 @@ impl Buffer {
9696
}
9797
}
9898
}
99-
impl WlBuffer for Buffer {}
99+
impl WlBuffer for Buffer {
100+
async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
101+
Ok(())
102+
}
103+
}

src/wayland/core/compositor.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@ impl WlRegion for Region {
5858
) -> Result<()> {
5959
Ok(())
6060
}
61+
62+
async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
63+
Ok(())
64+
}
6165
}

src/wayland/core/keyboard.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,8 @@ impl Keyboard {
211211
}
212212
}
213213

214-
impl WlKeyboard for Keyboard {}
214+
impl WlKeyboard for Keyboard {
215+
async fn release(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
216+
Ok(())
217+
}
218+
}

src/wayland/core/pointer.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,7 @@ impl WlPointer for Pointer {
171171
) -> Result<()> {
172172
Ok(())
173173
}
174+
async fn release(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
175+
Ok(())
176+
}
174177
}

src/wayland/core/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl WlRegistry for Registry {
119119
}
120120
id => {
121121
tracing::error!(id, "Wayland: failed to bind to registry global");
122-
return Err(Error::ObjectNotFound(new_id.object_id));
122+
return Err(Error::Internal);
123123
}
124124
}
125125

src/wayland/core/seat.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ use mint::Vector2;
33
use std::sync::Arc;
44
use std::sync::OnceLock;
55
pub use waynest::server::protocol::core::wayland::wl_seat::*;
6-
use waynest::wire::Fixed;
7-
use waynest::{
8-
server::{Client, Dispatcher, Result},
9-
wire::ObjectId,
10-
};
6+
use waynest::server::{Client, Dispatcher, Result};
7+
use waynest::wire::{Fixed, ObjectId};
118

129
#[derive(Debug)]
1310
pub enum SeatMessage {
@@ -196,4 +193,8 @@ impl WlSeat for Seat {
196193
let _ = self.touch.set(touch);
197194
Ok(())
198195
}
196+
197+
async fn release(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
198+
Ok(())
199+
}
199200
}

src/wayland/core/touch.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,12 @@ impl Touch {
6060
}
6161
}
6262

63-
impl WlTouch for Touch {}
63+
impl WlTouch for Touch {
64+
async fn release(
65+
&self,
66+
_client: &mut waynest::server::Client,
67+
_sender_id: waynest::wire::ObjectId,
68+
) -> Result<()> {
69+
Ok(())
70+
}
71+
}

src/wayland/xdg/surface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl XdgSurface for Surface {
7878
let has_valid_buffer = state
7979
.buffer
8080
.as_ref()
81-
.map_or(false, |b| b.size.x > 0 && b.size.y > 0);
81+
.is_some_and(|b| b.size.x > 0 && b.size.y > 0);
8282

8383
let mut mapped_lock = toplevel.mapped.lock();
8484
if mapped_lock.is_none()

0 commit comments

Comments
 (0)