fix(wayland): set xdg surface role properly
This commit is contained in:
@@ -35,7 +35,7 @@ impl Popup {
|
|||||||
xdg_surface: &Arc<Surface>,
|
xdg_surface: &Arc<Surface>,
|
||||||
positioner: &Positioner,
|
positioner: &Positioner,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
xdg_surface
|
let _ = xdg_surface
|
||||||
.wl_surface()
|
.wl_surface()
|
||||||
.surface_id
|
.surface_id
|
||||||
.set(SurfaceId::Child(rand::thread_rng().gen_range(0..u64::MAX)));
|
.set(SurfaceId::Child(rand::thread_rng().gen_range(0..u64::MAX)));
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
use super::backend::XdgBackend;
|
use super::backend::XdgBackend;
|
||||||
use crate::{
|
use crate::{
|
||||||
nodes::{Node, items::panel::PanelItem},
|
nodes::{
|
||||||
|
Node,
|
||||||
|
items::panel::{PanelItem, SurfaceId},
|
||||||
|
},
|
||||||
wayland::core::surface::Surface,
|
wayland::core::surface::Surface,
|
||||||
};
|
};
|
||||||
use mint::Vector2;
|
use mint::Vector2;
|
||||||
@@ -66,6 +69,8 @@ impl Toplevel {
|
|||||||
wl_surface: Arc<Surface>,
|
wl_surface: Arc<Surface>,
|
||||||
xdg_surface: Arc<super::surface::Surface>,
|
xdg_surface: Arc<super::surface::Surface>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
let _ = wl_surface.surface_id.set(SurfaceId::Toplevel(()));
|
||||||
|
|
||||||
Toplevel {
|
Toplevel {
|
||||||
id: object_id,
|
id: object_id,
|
||||||
wl_surface: Arc::downgrade(&wl_surface),
|
wl_surface: Arc::downgrade(&wl_surface),
|
||||||
|
|||||||
Reference in New Issue
Block a user