chore: Update smithay
This commit is contained in:
parent
4ee5aaf741
commit
a308997fd4
17 changed files with 64 additions and 5 deletions
|
|
@ -80,6 +80,7 @@ use std::{
|
|||
cell::RefCell,
|
||||
collections::{HashMap, HashSet},
|
||||
ffi::CStr,
|
||||
fmt,
|
||||
os::unix::io::FromRawFd,
|
||||
path::PathBuf,
|
||||
time::Duration,
|
||||
|
|
@ -93,6 +94,7 @@ use super::render::{init_shaders, CursorMode, GlMultiRenderer};
|
|||
// for now we assume we need at least 3ms
|
||||
const MIN_RENDER_TIME: Duration = Duration::from_millis(3);
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct KmsState {
|
||||
devices: HashMap<DrmNode, Device>,
|
||||
pub api: GpuManager<GbmGlesBackend<GlowRenderer>>,
|
||||
|
|
@ -113,6 +115,23 @@ pub struct Device {
|
|||
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 {
|
||||
surface: Option<GbmDrmCompositor>,
|
||||
connector: connector::Handle,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ use crate::{
|
|||
utils::prelude::*,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Socket {
|
||||
pub token: RegistrationToken,
|
||||
pub drm_global: GlobalId,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ use crate::state::Fps;
|
|||
|
||||
use super::render::{init_shaders, CursorMode};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct WinitState {
|
||||
// The winit backend currently has no notion of multiple windows
|
||||
pub backend: WinitGraphicsBackend<GlowRenderer>,
|
||||
|
|
|
|||
|
|
@ -47,11 +47,13 @@ use crate::state::Fps;
|
|||
|
||||
use super::render::init_shaders;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Allocator {
|
||||
Gbm(GbmAllocator<DrmDeviceFd>),
|
||||
Vulkan(PhysicalDevice),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct X11State {
|
||||
allocator: Allocator,
|
||||
_egl: EGLDisplay,
|
||||
|
|
@ -204,6 +206,7 @@ impl X11State {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Surface {
|
||||
window: Window,
|
||||
damage_tracker: OutputDamageTracker,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ use tracing::{debug, error, info, warn};
|
|||
mod types;
|
||||
pub use self::types::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Config {
|
||||
pub static_conf: StaticConfig,
|
||||
pub dynamic_conf: DynamicConfig,
|
||||
|
|
@ -60,6 +61,7 @@ pub enum WorkspaceLayout {
|
|||
Horizontal,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct DynamicConfig {
|
||||
outputs: (Option<PathBuf>, OutputsConfig),
|
||||
inputs: (Option<PathBuf>, InputsConfig),
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ impl ResizeMode {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Shell {
|
||||
pub popups: PopupManager,
|
||||
pub outputs: Vec<Output>,
|
||||
|
|
|
|||
|
|
@ -109,11 +109,13 @@ pub struct Data {
|
|||
pub state: State,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct State {
|
||||
pub backend: BackendData,
|
||||
pub common: Common,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Common {
|
||||
pub config: Config,
|
||||
|
||||
|
|
@ -156,6 +158,7 @@ pub struct Common {
|
|||
pub xwayland_state: Option<XWaylandState>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum BackendData {
|
||||
X11(X11State),
|
||||
Winit(WinitState),
|
||||
|
|
@ -677,6 +680,7 @@ pub struct Egui {
|
|||
pub state: smithay_egui::EguiState,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Fps {
|
||||
#[cfg(feature = "debug")]
|
||||
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>>>);
|
||||
|
||||
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,
|
||||
// but the rest should be fine.
|
||||
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};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct WlDrmState;
|
||||
|
||||
/// Data associated with a drm global.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ use std::{
|
|||
},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct OutputConfigurationState<D> {
|
||||
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>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct OutputMngrInstance {
|
||||
obj: ZwlrOutputManagerV1,
|
||||
active: Arc<AtomicBool>,
|
||||
heads: Vec<OutputHeadInstance>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct OutputHeadInstance {
|
||||
output: Output,
|
||||
head: ZwlrOutputHeadV1,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ use super::{
|
|||
};
|
||||
|
||||
/// Screencopy global state
|
||||
#[derive(Debug)]
|
||||
pub struct ScreencopyState {
|
||||
global: GlobalId,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ pub trait Window: IsAlive + Clone + Send {
|
|||
fn user_data(&self) -> &UserDataMap;
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ToplevelInfoState<D, W: Window> {
|
||||
dh: DisplayHandle,
|
||||
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};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ToplevelManagementState {
|
||||
instances: Vec<ZcosmicToplevelManagerV1>,
|
||||
capabilities: Vec<ManagementCapabilities>,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ pub use cosmic_protocols::workspace::v1::server::{
|
|||
zcosmic_workspace_handle_v1::ZcosmicWorkspaceCapabilitiesV1 as WorkspaceCapabilities,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct WorkspaceState<D>
|
||||
where
|
||||
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_workspace_id, WORKSPACE_ID, WORKSPACE_IDS);
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Debug, Default)]
|
||||
pub struct WorkspaceGroup {
|
||||
id: usize,
|
||||
instances: Vec<ZcosmicWorkspaceGroupHandleV1>,
|
||||
|
|
@ -72,7 +73,7 @@ pub struct WorkspaceGroupDataInner {
|
|||
}
|
||||
pub type WorkspaceGroupData = Mutex<WorkspaceGroupDataInner>;
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Workspace {
|
||||
id: usize,
|
||||
instances: Vec<ZcosmicWorkspaceHandleV1>,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ use smithay::{
|
|||
};
|
||||
use tracing::{error, trace, warn};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct XWaylandState {
|
||||
pub xwm: Option<X11Wm>,
|
||||
pub display: u32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue