fix(wayland): upgrade smithay version
This commit is contained in:
@@ -19,12 +19,12 @@ use smithay::{
|
||||
backend::{egl::EGLContext, renderer::gles2::Gles2Renderer},
|
||||
reexports::wayland_server::{backend::GlobalId, Display, ListeningSocket, Resource},
|
||||
};
|
||||
use std::os::unix::prelude::AsRawFd;
|
||||
use std::{
|
||||
ffi::c_void,
|
||||
os::unix::{net::UnixListener, prelude::FromRawFd},
|
||||
sync::Arc,
|
||||
};
|
||||
use std::{os::unix::prelude::AsRawFd, time::Duration};
|
||||
use stereokit as sk;
|
||||
use stereokit::StereoKit;
|
||||
use tokio::{
|
||||
@@ -143,15 +143,18 @@ impl Wayland {
|
||||
}
|
||||
|
||||
pub fn frame(&mut self, sk: &StereoKit) {
|
||||
let time_ms = (sk.time_getf() * 1000.) as u32;
|
||||
let time_ms = (sk.time_getf() * 1000.) as u64;
|
||||
|
||||
for core_surface in CORE_SURFACES.get_valid_contents() {
|
||||
let client_id = core_surface.wl_surface().client_id().unwrap();
|
||||
let seat_data = self.state.lock().seats.get(&client_id).unwrap().clone();
|
||||
let client_id = core_surface.wl_surface().client().unwrap().id();
|
||||
let state = self.state.lock();
|
||||
let seat_data = state.seats.get(&client_id).unwrap().clone();
|
||||
let output = state.output.clone();
|
||||
core_surface.process(
|
||||
sk,
|
||||
&mut self.renderer,
|
||||
time_ms,
|
||||
output,
|
||||
Duration::from_millis(time_ms),
|
||||
&self.log,
|
||||
|data| {
|
||||
PanelItem::on_mapped(&core_surface, data, seat_data);
|
||||
|
||||
@@ -14,12 +14,16 @@ use smithay::{
|
||||
Texture,
|
||||
},
|
||||
desktop::utils::send_frames_surface_tree,
|
||||
output::Output,
|
||||
reexports::wayland_server::{
|
||||
backend::ObjectId, protocol::wl_surface::WlSurface, Display, DisplayHandle, Resource,
|
||||
},
|
||||
wayland::compositor::{self, SurfaceData},
|
||||
};
|
||||
use std::sync::{Arc, Weak};
|
||||
use std::{
|
||||
sync::{Arc, Weak},
|
||||
time::Duration,
|
||||
};
|
||||
use stereokit::{
|
||||
material::{Material, Transparency},
|
||||
shader::Shader,
|
||||
@@ -118,7 +122,8 @@ impl CoreSurface {
|
||||
&self,
|
||||
sk: &StereoKit,
|
||||
renderer: &mut Gles2Renderer,
|
||||
time_ms: u32,
|
||||
output: Output,
|
||||
time: Duration,
|
||||
log: &Logger,
|
||||
on_mapped: F,
|
||||
if_mapped: M,
|
||||
@@ -160,7 +165,9 @@ impl CoreSurface {
|
||||
if_mapped(data);
|
||||
});
|
||||
|
||||
send_frames_surface_tree(&self.wl_surface(), time_ms);
|
||||
send_frames_surface_tree(&self.wl_surface(), &output, time, None, |_, _| {
|
||||
Some(output.clone())
|
||||
});
|
||||
}
|
||||
|
||||
pub fn apply_material(&self, model: Arc<Model>, material_idx: u32) {
|
||||
|
||||
Reference in New Issue
Block a user