clean(wayland): unnecessary variables

This commit is contained in:
Nova
2025-09-09 18:49:55 -07:00
parent 45ec292b99
commit 0650956ab4
2 changed files with 3 additions and 21 deletions

View File

@@ -2,10 +2,7 @@ use super::{
positioner::{Positioner, PositionerData},
surface::Surface,
};
use crate::{
nodes::items::panel::{Geometry, SurfaceId},
wayland::util::DoubleBuffer,
};
use crate::nodes::items::panel::SurfaceId;
use parking_lot::Mutex;
use rand::Rng;
use std::sync::Arc;
@@ -16,21 +13,12 @@ use waynest::{
#[derive(Debug, Dispatcher)]
pub struct Popup {
id: ObjectId,
version: u32,
parent: Arc<Surface>,
pub surface: Arc<Surface>,
positioner_data: Mutex<PositionerData>,
geometry: DoubleBuffer<Geometry>,
}
impl Popup {
pub fn new(
id: ObjectId,
version: u32,
parent: Arc<Surface>,
surface: Arc<Surface>,
positioner: &Positioner,
) -> Self {
pub fn new(version: u32, surface: Arc<Surface>, positioner: &Positioner) -> Self {
let _ = surface
.wl_surface
.surface_id
@@ -38,12 +26,9 @@ impl Popup {
let positioner_data = positioner.data();
Self {
id,
version,
parent,
surface,
positioner_data: Mutex::new(positioner_data),
geometry: DoubleBuffer::new(positioner_data.infinite_geometry()),
}
}
}

View File

@@ -156,10 +156,7 @@ impl XdgSurface for Surface {
let surface = client.get::<Surface>(self.id).unwrap();
let popup = client.insert(
popup_id,
Popup::new(popup_id, self.version, parent.clone(), surface, &positioner),
);
let popup = client.insert(popup_id, Popup::new(self.version, surface, &positioner));
popup.configure(client, popup_id, 0, 0, 0, 0).await?;
let serial = client.next_event_serial();