shell: Unify element_for_(x11_|wl_)surface
This commit is contained in:
parent
dbe2a073ef
commit
6858238bd6
13 changed files with 56 additions and 105 deletions
|
|
@ -73,6 +73,18 @@ impl From<X11Surface> for CosmicSurface {
|
|||
}
|
||||
}
|
||||
|
||||
impl PartialEq<WlSurface> for CosmicSurface {
|
||||
fn eq(&self, other: &WlSurface) -> bool {
|
||||
self.wl_surface().map_or(false, |s| &s == other)
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq<X11Surface> for CosmicSurface {
|
||||
fn eq(&self, other: &X11Surface) -> bool {
|
||||
self.x11_surface().map_or(false, |s| s == other)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct Minimized(AtomicBool);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue