cleanup: wayland

This commit is contained in:
Nova
2025-09-09 00:37:00 -07:00
parent 1c8aa93850
commit 707452462d
2 changed files with 2 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ impl XdgBackend {
return; return;
}; };
if let Some(mut child) = self.children.get_mut(&id) { if let Some(mut child) = self.children.get_mut(id) {
child.1.geometry = geometry; child.1.geometry = geometry;
} }
let Some(panel_item) = self.panel_item() else { let Some(panel_item) = self.panel_item() else {

View File

@@ -8,10 +8,7 @@ use crate::{
}; };
use parking_lot::Mutex; use parking_lot::Mutex;
use rand::Rng; use rand::Rng;
use std::sync::{ use std::sync::Arc;
Arc,
atomic::{AtomicBool, Ordering},
};
use waynest::{ use waynest::{
server::{Client, Dispatcher, Result, protocol::stable::xdg_shell::xdg_popup::XdgPopup}, server::{Client, Dispatcher, Result, protocol::stable::xdg_shell::xdg_popup::XdgPopup},
wire::ObjectId, wire::ObjectId,
@@ -25,7 +22,6 @@ pub struct Popup {
pub surface: Arc<Surface>, pub surface: Arc<Surface>,
positioner_data: Mutex<PositionerData>, positioner_data: Mutex<PositionerData>,
geometry: DoubleBuffer<Geometry>, geometry: DoubleBuffer<Geometry>,
mapped: AtomicBool,
} }
impl Popup { impl Popup {
pub fn new( pub fn new(
@@ -48,7 +44,6 @@ impl Popup {
surface, surface,
positioner_data: Mutex::new(positioner_data), positioner_data: Mutex::new(positioner_data),
geometry: DoubleBuffer::new(positioner_data.infinite_geometry()), geometry: DoubleBuffer::new(positioner_data.infinite_geometry()),
mapped: AtomicBool::new(false),
} }
} }
} }
@@ -106,9 +101,6 @@ impl XdgPopup for Popup {
} }
impl Drop for Popup { impl Drop for Popup {
fn drop(&mut self) { fn drop(&mut self) {
if !self.mapped.load(Ordering::Relaxed) {
return;
}
let Some(panel_item) = self.surface.wl_surface.panel_item.lock().upgrade() else { let Some(panel_item) = self.surface.wl_surface.panel_item.lock().upgrade() else {
return; return;
}; };