fix(wayland): set xdg surface role properly

This commit is contained in:
Nova
2025-09-06 14:40:56 -07:00
parent 9e8f09fe97
commit f44abad5b0
2 changed files with 7 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ impl Popup {
xdg_surface: &Arc<Surface>,
positioner: &Positioner,
) -> Self {
xdg_surface
let _ = xdg_surface
.wl_surface()
.surface_id
.set(SurfaceId::Child(rand::thread_rng().gen_range(0..u64::MAX)));

View File

@@ -1,6 +1,9 @@
use super::backend::XdgBackend;
use crate::{
nodes::{Node, items::panel::PanelItem},
nodes::{
Node,
items::panel::{PanelItem, SurfaceId},
},
wayland::core::surface::Surface,
};
use mint::Vector2;
@@ -66,6 +69,8 @@ impl Toplevel {
wl_surface: Arc<Surface>,
xdg_surface: Arc<super::surface::Surface>,
) -> Self {
let _ = wl_surface.surface_id.set(SurfaceId::Toplevel(()));
Toplevel {
id: object_id,
wl_surface: Arc::downgrade(&wl_surface),