feat: upgrade smithay

This commit is contained in:
Nova
2023-09-25 22:38:00 -04:00
parent 4da7ed1ccf
commit e97368f3e2
4 changed files with 325 additions and 307 deletions

618
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -60,8 +60,8 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
global_counter = "0.2.2" global_counter = "0.2.2"
rand = "0.8.5" rand = "0.8.5"
atty = "0.2.14" atty = "0.2.14"
xkbcommon = { version = "0.6.0", default-features = false, optional = true }
xkbcommon = { version = "0.5.0", default-features = false, optional = true }
[dependencies.smithay] [dependencies.smithay]
# git = "https://github.com/technobaboo/smithay.git" # Until we get stereokit to understand OES samplers and external textures # git = "https://github.com/technobaboo/smithay.git" # Until we get stereokit to understand OES samplers and external textures
git = "https://github.com/smithay/smithay.git" # Until we get stereokit to understand OES samplers and external textures git = "https://github.com/smithay/smithay.git" # Until we get stereokit to understand OES samplers and external textures

View File

@@ -36,7 +36,7 @@ use std::{
}; };
use tokio::sync::watch; use tokio::sync::watch;
use tracing::{debug, warn}; use tracing::{debug, warn};
use xkbcommon::xkb::{self, ffi::XKB_KEYMAP_FORMAT_TEXT_V1, Keymap}; use xkbcommon::xkb::{self, ffi::XKB_KEYMAP_FORMAT_TEXT_V1, Keycode, Keymap};
pub fn handle_cursor<B: Backend>( pub fn handle_cursor<B: Backend>(
panel_item: &Arc<PanelItem<B>>, panel_item: &Arc<PanelItem<B>>,
@@ -75,7 +75,7 @@ impl KeyboardInfo {
} else { } else {
xkb::KeyDirection::Up xkb::KeyDirection::Up
}; };
let state_components = self.state.update_key(key + 8, xkb_key_state); let state_components = self.state.update_key(Keycode::new(key + 8), xkb_key_state);
if state_components != 0 { if state_components != 0 {
self.mods.update_with(&self.state); self.mods.update_with(&self.state);
keyboard.modifiers( keyboard.modifiers(

View File

@@ -29,10 +29,8 @@ use smithay::reexports::{
xdg_wm_base::{self, XdgWmBase}, xdg_wm_base::{self, XdgWmBase},
}, },
wayland_server::{ wayland_server::{
backend::{ClientId, ObjectId}, backend::ClientId, protocol::wl_surface::WlSurface, Client, DataInit, Dispatch,
protocol::wl_surface::WlSurface, DisplayHandle, GlobalDispatch, New, Resource, WEnum, Weak as WlWeak,
Client, DataInit, Dispatch, DisplayHandle, GlobalDispatch, New, Resource, WEnum,
Weak as WlWeak,
}, },
}; };
use std::{ use std::{
@@ -740,7 +738,7 @@ impl Dispatch<XdgPopup, Mutex<PopupData>, WaylandState> for WaylandState {
fn destroyed( fn destroyed(
_state: &mut WaylandState, _state: &mut WaylandState,
_client: ClientId, _client: ClientId,
_resource: ObjectId, _popup: &XdgPopup,
data: &Mutex<PopupData>, data: &Mutex<PopupData>,
) { ) {
let data = data.lock(); let data = data.lock();