chore: Update smithay
This commit is contained in:
parent
4ee5aaf741
commit
a308997fd4
17 changed files with 64 additions and 5 deletions
16
Cargo.lock
generated
16
Cargo.lock
generated
|
|
@ -3131,6 +3131,19 @@ name = "profiling"
|
||||||
version = "1.0.8"
|
version = "1.0.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "332cd62e95873ea4f41f3dfd6bbbfc5b52aec892d7e8d534197c4720a0bbbab2"
|
checksum = "332cd62e95873ea4f41f3dfd6bbbfc5b52aec892d7e8d534197c4720a0bbbab2"
|
||||||
|
dependencies = [
|
||||||
|
"profiling-procmacros",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "profiling-procmacros"
|
||||||
|
version = "1.0.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a10adb8d151bb1280afb8bed41ae5db26be1b056964947133c7525b0bf39c0b0"
|
||||||
|
dependencies = [
|
||||||
|
"quote",
|
||||||
|
"syn 1.0.109",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "puffin"
|
name = "puffin"
|
||||||
|
|
@ -3721,7 +3734,7 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smithay"
|
name = "smithay"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/smithay//smithay?rev=8d239c79ae#8d239c79ae5a7f08d6acbc17183c0576af3edd38"
|
source = "git+https://github.com/smithay//smithay?rev=901f64d01e#901f64d01e3dc4ed7448884b821748dbb1ab5455"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"appendlist",
|
"appendlist",
|
||||||
"ash",
|
"ash",
|
||||||
|
|
@ -3746,6 +3759,7 @@ dependencies = [
|
||||||
"nix 0.26.2",
|
"nix 0.26.2",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
|
"profiling",
|
||||||
"rand",
|
"rand",
|
||||||
"scan_fmt",
|
"scan_fmt",
|
||||||
"scopeguard",
|
"scopeguard",
|
||||||
|
|
|
||||||
|
|
@ -80,4 +80,4 @@ debug = true
|
||||||
lto = "fat"
|
lto = "fat"
|
||||||
|
|
||||||
[patch."https://github.com/Smithay/smithay.git"]
|
[patch."https://github.com/Smithay/smithay.git"]
|
||||||
smithay = { git = "https://github.com/smithay//smithay", rev = "8d239c79ae" }
|
smithay = { git = "https://github.com/smithay//smithay", rev = "901f64d01e" }
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ use std::{
|
||||||
cell::RefCell,
|
cell::RefCell,
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
ffi::CStr,
|
ffi::CStr,
|
||||||
|
fmt,
|
||||||
os::unix::io::FromRawFd,
|
os::unix::io::FromRawFd,
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
time::Duration,
|
time::Duration,
|
||||||
|
|
@ -93,6 +94,7 @@ use super::render::{init_shaders, CursorMode, GlMultiRenderer};
|
||||||
// for now we assume we need at least 3ms
|
// for now we assume we need at least 3ms
|
||||||
const MIN_RENDER_TIME: Duration = Duration::from_millis(3);
|
const MIN_RENDER_TIME: Duration = Duration::from_millis(3);
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct KmsState {
|
pub struct KmsState {
|
||||||
devices: HashMap<DrmNode, Device>,
|
devices: HashMap<DrmNode, Device>,
|
||||||
pub api: GpuManager<GbmGlesBackend<GlowRenderer>>,
|
pub api: GpuManager<GbmGlesBackend<GlowRenderer>>,
|
||||||
|
|
@ -113,6 +115,23 @@ pub struct Device {
|
||||||
socket: Option<Socket>,
|
socket: Option<Socket>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Debug for Device {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
f.debug_struct("Device")
|
||||||
|
.field("render_node", &self.render_node)
|
||||||
|
.field("surfaces", &self.surfaces)
|
||||||
|
.field("drm", &self.drm)
|
||||||
|
.field("gbm", &self.gbm)
|
||||||
|
.field("allocator", &"...")
|
||||||
|
.field("formats", &self.formats)
|
||||||
|
.field("supports_atomic", &self.supports_atomic)
|
||||||
|
.field("event_token", &self.event_token)
|
||||||
|
.field("socket", &self.socket)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Surface {
|
pub struct Surface {
|
||||||
surface: Option<GbmDrmCompositor>,
|
surface: Option<GbmDrmCompositor>,
|
||||||
connector: connector::Handle,
|
connector: connector::Handle,
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ use crate::{
|
||||||
utils::prelude::*,
|
utils::prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Socket {
|
pub struct Socket {
|
||||||
pub token: RegistrationToken,
|
pub token: RegistrationToken,
|
||||||
pub drm_global: GlobalId,
|
pub drm_global: GlobalId,
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ use crate::state::Fps;
|
||||||
|
|
||||||
use super::render::{init_shaders, CursorMode};
|
use super::render::{init_shaders, CursorMode};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct WinitState {
|
pub struct WinitState {
|
||||||
// The winit backend currently has no notion of multiple windows
|
// The winit backend currently has no notion of multiple windows
|
||||||
pub backend: WinitGraphicsBackend<GlowRenderer>,
|
pub backend: WinitGraphicsBackend<GlowRenderer>,
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,13 @@ use crate::state::Fps;
|
||||||
|
|
||||||
use super::render::init_shaders;
|
use super::render::init_shaders;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
enum Allocator {
|
enum Allocator {
|
||||||
Gbm(GbmAllocator<DrmDeviceFd>),
|
Gbm(GbmAllocator<DrmDeviceFd>),
|
||||||
Vulkan(PhysicalDevice),
|
Vulkan(PhysicalDevice),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct X11State {
|
pub struct X11State {
|
||||||
allocator: Allocator,
|
allocator: Allocator,
|
||||||
_egl: EGLDisplay,
|
_egl: EGLDisplay,
|
||||||
|
|
@ -204,6 +206,7 @@ impl X11State {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Surface {
|
pub struct Surface {
|
||||||
window: Window,
|
window: Window,
|
||||||
damage_tracker: OutputDamageTracker,
|
damage_tracker: OutputDamageTracker,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ use tracing::{debug, error, info, warn};
|
||||||
mod types;
|
mod types;
|
||||||
pub use self::types::*;
|
pub use self::types::*;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
pub static_conf: StaticConfig,
|
pub static_conf: StaticConfig,
|
||||||
pub dynamic_conf: DynamicConfig,
|
pub dynamic_conf: DynamicConfig,
|
||||||
|
|
@ -60,6 +61,7 @@ pub enum WorkspaceLayout {
|
||||||
Horizontal,
|
Horizontal,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct DynamicConfig {
|
pub struct DynamicConfig {
|
||||||
outputs: (Option<PathBuf>, OutputsConfig),
|
outputs: (Option<PathBuf>, OutputsConfig),
|
||||||
inputs: (Option<PathBuf>, InputsConfig),
|
inputs: (Option<PathBuf>, InputsConfig),
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ impl ResizeMode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Shell {
|
pub struct Shell {
|
||||||
pub popups: PopupManager,
|
pub popups: PopupManager,
|
||||||
pub outputs: Vec<Output>,
|
pub outputs: Vec<Output>,
|
||||||
|
|
|
||||||
|
|
@ -109,11 +109,13 @@ pub struct Data {
|
||||||
pub state: State,
|
pub state: State,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct State {
|
pub struct State {
|
||||||
pub backend: BackendData,
|
pub backend: BackendData,
|
||||||
pub common: Common,
|
pub common: Common,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Common {
|
pub struct Common {
|
||||||
pub config: Config,
|
pub config: Config,
|
||||||
|
|
||||||
|
|
@ -156,6 +158,7 @@ pub struct Common {
|
||||||
pub xwayland_state: Option<XWaylandState>,
|
pub xwayland_state: Option<XWaylandState>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub enum BackendData {
|
pub enum BackendData {
|
||||||
X11(X11State),
|
X11(X11State),
|
||||||
Winit(WinitState),
|
Winit(WinitState),
|
||||||
|
|
@ -677,6 +680,7 @@ pub struct Egui {
|
||||||
pub state: smithay_egui::EguiState,
|
pub state: smithay_egui::EguiState,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Fps {
|
pub struct Fps {
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
pub rd: Option<renderdoc::RenderDoc<renderdoc::V110>>,
|
pub rd: Option<renderdoc::RenderDoc<renderdoc::V110>>,
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,14 @@ use smithay::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct IcedElement<P: Program + Send + 'static>(Arc<Mutex<IcedElementInternal<P>>>);
|
pub struct IcedElement<P: Program + Send + 'static>(Arc<Mutex<IcedElementInternal<P>>>);
|
||||||
|
|
||||||
|
impl<P: Program + Send + 'static> fmt::Debug for IcedElement<P> {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
fmt::Debug::fmt(&self.0, f)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// SAFETY: We cannot really be sure about `iced_native::program::State` sadly,
|
// SAFETY: We cannot really be sure about `iced_native::program::State` sadly,
|
||||||
// but the rest should be fine.
|
// but the rest should be fine.
|
||||||
unsafe impl<P: Program + Send + 'static> Send for IcedElementInternal<P> {}
|
unsafe impl<P: Program + Send + 'static> Send for IcedElementInternal<P> {}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ use tracing::trace;
|
||||||
|
|
||||||
use std::{convert::TryFrom, path::PathBuf, sync::Arc};
|
use std::{convert::TryFrom, path::PathBuf, sync::Arc};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct WlDrmState;
|
pub struct WlDrmState;
|
||||||
|
|
||||||
/// Data associated with a drm global.
|
/// Data associated with a drm global.
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ use std::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct OutputConfigurationState<D> {
|
pub struct OutputConfigurationState<D> {
|
||||||
outputs: Vec<Output>,
|
outputs: Vec<Output>,
|
||||||
removed_outputs: Vec<Output>,
|
removed_outputs: Vec<Output>,
|
||||||
|
|
@ -48,12 +49,14 @@ pub struct OutputMngrGlobalData {
|
||||||
filter: Box<dyn for<'a> Fn(&'a Client) -> bool + Send + Sync>,
|
filter: Box<dyn for<'a> Fn(&'a Client) -> bool + Send + Sync>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct OutputMngrInstance {
|
struct OutputMngrInstance {
|
||||||
obj: ZwlrOutputManagerV1,
|
obj: ZwlrOutputManagerV1,
|
||||||
active: Arc<AtomicBool>,
|
active: Arc<AtomicBool>,
|
||||||
heads: Vec<OutputHeadInstance>,
|
heads: Vec<OutputHeadInstance>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct OutputHeadInstance {
|
struct OutputHeadInstance {
|
||||||
output: Output,
|
output: Output,
|
||||||
head: ZwlrOutputHeadV1,
|
head: ZwlrOutputHeadV1,
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ use super::{
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Screencopy global state
|
/// Screencopy global state
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct ScreencopyState {
|
pub struct ScreencopyState {
|
||||||
global: GlobalId,
|
global: GlobalId,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ pub trait Window: IsAlive + Clone + Send {
|
||||||
fn user_data(&self) -> &UserDataMap;
|
fn user_data(&self) -> &UserDataMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct ToplevelInfoState<D, W: Window> {
|
pub struct ToplevelInfoState<D, W: Window> {
|
||||||
dh: DisplayHandle,
|
dh: DisplayHandle,
|
||||||
pub(super) toplevels: Vec<W>,
|
pub(super) toplevels: Vec<W>,
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ use cosmic_protocols::toplevel_management::v1::server::zcosmic_toplevel_manager_
|
||||||
|
|
||||||
use super::toplevel_info::{window_from_handle, ToplevelInfoHandler, ToplevelState, Window};
|
use super::toplevel_info::{window_from_handle, ToplevelInfoHandler, ToplevelState, Window};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct ToplevelManagementState {
|
pub struct ToplevelManagementState {
|
||||||
instances: Vec<ZcosmicToplevelManagerV1>,
|
instances: Vec<ZcosmicToplevelManagerV1>,
|
||||||
capabilities: Vec<ManagementCapabilities>,
|
capabilities: Vec<ManagementCapabilities>,
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ pub use cosmic_protocols::workspace::v1::server::{
|
||||||
zcosmic_workspace_handle_v1::ZcosmicWorkspaceCapabilitiesV1 as WorkspaceCapabilities,
|
zcosmic_workspace_handle_v1::ZcosmicWorkspaceCapabilitiesV1 as WorkspaceCapabilities,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct WorkspaceState<D>
|
pub struct WorkspaceState<D>
|
||||||
where
|
where
|
||||||
D: GlobalDispatch<ZcosmicWorkspaceManagerV1, WorkspaceGlobalData>
|
D: GlobalDispatch<ZcosmicWorkspaceManagerV1, WorkspaceGlobalData>
|
||||||
|
|
@ -50,7 +51,7 @@ where
|
||||||
crate::utils::id_gen!(next_group_id, GROUP_ID, GROUP_IDS);
|
crate::utils::id_gen!(next_group_id, GROUP_ID, GROUP_IDS);
|
||||||
crate::utils::id_gen!(next_workspace_id, WORKSPACE_ID, WORKSPACE_IDS);
|
crate::utils::id_gen!(next_workspace_id, WORKSPACE_ID, WORKSPACE_IDS);
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct WorkspaceGroup {
|
pub struct WorkspaceGroup {
|
||||||
id: usize,
|
id: usize,
|
||||||
instances: Vec<ZcosmicWorkspaceGroupHandleV1>,
|
instances: Vec<ZcosmicWorkspaceGroupHandleV1>,
|
||||||
|
|
@ -72,7 +73,7 @@ pub struct WorkspaceGroupDataInner {
|
||||||
}
|
}
|
||||||
pub type WorkspaceGroupData = Mutex<WorkspaceGroupDataInner>;
|
pub type WorkspaceGroupData = Mutex<WorkspaceGroupDataInner>;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct Workspace {
|
pub struct Workspace {
|
||||||
id: usize,
|
id: usize,
|
||||||
instances: Vec<ZcosmicWorkspaceHandleV1>,
|
instances: Vec<ZcosmicWorkspaceHandleV1>,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ use smithay::{
|
||||||
};
|
};
|
||||||
use tracing::{error, trace, warn};
|
use tracing::{error, trace, warn};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct XWaylandState {
|
pub struct XWaylandState {
|
||||||
pub xwm: Option<X11Wm>,
|
pub xwm: Option<X11Wm>,
|
||||||
pub display: u32,
|
pub display: u32,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue