diff options
Diffstat (limited to 'crates/wayland/src/state')
| -rw-r--r-- | crates/wayland/src/state/lifecycle.rs | 10 | ||||
| -rw-r--r-- | crates/wayland/src/state/mod.rs | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/crates/wayland/src/state/lifecycle.rs b/crates/wayland/src/state/lifecycle.rs index f7ae40a..0d301dc 100644 --- a/crates/wayland/src/state/lifecycle.rs +++ b/crates/wayland/src/state/lifecycle.rs @@ -109,8 +109,17 @@ impl CompState { } else { self.border_top_decorations.remove(&id); } + if strips[1].width > 0 && strips[1].height > 0 { + let data = decoration::render_border_bottom(strips[1].width, w.border_width, color); + let buffer = + MemoryRenderBuffer::from_slice(&data, Fourcc::Argb8888, (strips[1].width as i32, w.border_width as i32), 1, Transform::Normal, None); + self.border_bottom_decorations.insert(id, buffer); + } else { + self.border_bottom_decorations.remove(&id); + } } else { self.border_top_decorations.remove(&id); + self.border_bottom_decorations.remove(&id); } // No shadow for a maximized/fullscreen window: it already reaches // (or, for fullscreen, exceeds) the monitor's own edge, so there is @@ -138,6 +147,7 @@ impl CompState { } self.decorations.remove(&id); self.border_top_decorations.remove(&id); + self.border_bottom_decorations.remove(&id); self.shadow_buffers.remove(&id); self.border_side_buffers.remove(&id); self.last_synced_size.remove(&id); diff --git a/crates/wayland/src/state/mod.rs b/crates/wayland/src/state/mod.rs index ff7ef74..834cf6a 100644 --- a/crates/wayland/src/state/mod.rs +++ b/crates/wayland/src/state/mod.rs @@ -237,6 +237,9 @@ pub(crate) struct CompState { /// `elements::border_side_render_element`'s doc comment for the damage- /// tracking reason a per-frame rebuild was wrong in the first place. pub(crate) border_top_decorations: HashMap<WindowId, MemoryRenderBuffer>, + /// [`Self::border_top_decorations`]'s mirror for the bottom strip's own + /// two corners - same cache, same trigger points, same reasoning. + pub(crate) border_bottom_decorations: HashMap<WindowId, MemoryRenderBuffer>, /// A window's drop-shadow bitmap (`decoration::shadow_bitmap`), cached /// the same way and at the same trigger points as `border_top_decorations` /// - rebuilt only on creation or a real size change, not per frame, for |