wl_surface: ignore toplevel damage bounds if toplevel is detached
This commit is contained in:
parent
fbefc45253
commit
4038ac1db5
3 changed files with 9 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ use {
|
||||||
utils::asyncevent::AsyncEvent,
|
utils::asyncevent::AsyncEvent,
|
||||||
wheel::Wheel,
|
wheel::Wheel,
|
||||||
},
|
},
|
||||||
std::{any::Any, future::pending, rc::Rc, sync::Arc},
|
std::{future::pending, rc::Rc, sync::Arc},
|
||||||
uapi::{OwnedFd, c::EFD_CLOEXEC},
|
uapi::{OwnedFd, c::EFD_CLOEXEC},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1453,7 +1453,7 @@ impl WlSurface {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn apply_damage(&self, pending: &PendingState) {
|
fn apply_damage(&self, pending: &PendingState) {
|
||||||
let bounds = self.toplevel.get().map(|tl| tl.node_absolute_position());
|
let bounds = self.toplevel.get().and_then(|tl| tl.tl_render_bounds());
|
||||||
let pos = self.buffer_abs_pos.get();
|
let pos = self.buffer_abs_pos.get();
|
||||||
let apply_damage = |pos: Rect| {
|
let apply_damage = |pos: Rect| {
|
||||||
if pending.damage_full {
|
if pending.damage_full {
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,13 @@ pub trait ToplevelNodeBase: Node {
|
||||||
let _ = start;
|
let _ = start;
|
||||||
default_tile_drag_bounds(self, split)
|
default_tile_drag_bounds(self, split)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn tl_render_bounds(&self) -> Option<Rect> {
|
||||||
|
self.tl_data()
|
||||||
|
.parent
|
||||||
|
.is_some()
|
||||||
|
.then_some(self.node_absolute_position())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct FullscreenedData {
|
pub struct FullscreenedData {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue