shell: Fix windows global geometry to include ssd

This commit is contained in:
Victoria Brekenfeld 2024-12-05 17:30:27 +01:00 committed by Victoria Brekenfeld
parent e3b41c5c55
commit fc84fa9948
5 changed files with 31 additions and 26 deletions

View file

@ -3,7 +3,7 @@
use smithay::utils::{user_data::UserDataMap, Rectangle};
use crate::{
shell::{element::surface::GlobalGeometry, CosmicSurface},
shell::CosmicSurface,
state::State,
utils::prelude::Global,
wayland::protocols::toplevel_info::{
@ -52,13 +52,7 @@ impl Window for CosmicSurface {
}
fn global_geometry(&self) -> Option<Rectangle<i32, Global>> {
self.user_data()
.get_or_insert(GlobalGeometry::default)
.0
.lock()
.unwrap()
.clone()
.filter(|_| !self.is_minimized())
CosmicSurface::global_geometry(self)
}
fn user_data(&self) -> &UserDataMap {