xwayland: Add initial support
This commit is contained in:
parent
78ffe3a93d
commit
1d28574088
23 changed files with 781 additions and 185 deletions
|
|
@ -29,9 +29,9 @@ use smithay::{
|
|||
wayland::{
|
||||
compositor::{with_states, SurfaceData},
|
||||
seat::WaylandFocus,
|
||||
shell::xdg::XdgToplevelSurfaceData,
|
||||
shell::xdg::{ToplevelSurface, XdgToplevelSurfaceData},
|
||||
},
|
||||
xwayland::X11Surface,
|
||||
xwayland::{xwm::X11Relatable, X11Surface},
|
||||
};
|
||||
|
||||
space_elements! {
|
||||
|
|
@ -41,6 +41,24 @@ space_elements! {
|
|||
X11=X11Surface,
|
||||
}
|
||||
|
||||
impl From<ToplevelSurface> for CosmicSurface {
|
||||
fn from(s: ToplevelSurface) -> Self {
|
||||
CosmicSurface::Wayland(Window::new(s))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Window> for CosmicSurface {
|
||||
fn from(w: Window) -> Self {
|
||||
CosmicSurface::Wayland(w)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<X11Surface> for CosmicSurface {
|
||||
fn from(s: X11Surface) -> Self {
|
||||
CosmicSurface::X11(s)
|
||||
}
|
||||
}
|
||||
|
||||
pub const SSD_HEIGHT: i32 = 48;
|
||||
|
||||
impl CosmicSurface {
|
||||
|
|
@ -577,3 +595,12 @@ where
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl X11Relatable for CosmicSurface {
|
||||
fn is_window(&self, window: &X11Surface) -> bool {
|
||||
match self {
|
||||
CosmicSurface::X11(surface) => surface == window,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue