feat(wayland): popups, more compatibility, more stability

get_parent


grab


popups

fix head thingy


popup list


feat: remove set_active

feat(wayland): commit_popup

feat(wayland): cleanup


moar changess


actually fix the problem with everything oh my god


proper popup state


fix: multi thread event loop


fix: match popup surface ID


make wayland input system go over surfaces instead of toplevels


feat: massive refactor of all wayland things
This commit is contained in:
Nova
2023-04-24 06:18:21 -04:00
parent 648451b47e
commit 4737149c85
14 changed files with 1091 additions and 773 deletions

View File

@@ -107,7 +107,7 @@ impl MaterialParameter {
let Some(texture_path) = resource.get_file(
&client.base_resource_prefixes.lock().clone(),
&[OsStr::new("png"), OsStr::new("jpg")],
) else { return; };
) else {return};
if let Some(tex) = Texture::from_file(sk, texture_path, true, 0) {
material.set_parameter(sk, parameter_name, &tex);
}

View File

@@ -12,6 +12,7 @@ use crate::{
};
use color_eyre::eyre::{eyre, Result};
use lazy_static::lazy_static;
use nanoid::nanoid;
use serde::Deserialize;
use stardust_xr::{
schemas::flex::{deserialize, flexbuffers, serialize},
@@ -38,6 +39,7 @@ impl EnvironmentItem {
pub fn add_to(node: &Arc<Node>, path: String) {
Item::add_to(
node,
nanoid!(),
&ITEM_TYPE_INFO_ENVIRONMENT,
ItemType::Environment(EnvironmentItem { path }),
);

View File

@@ -88,12 +88,13 @@ pub struct Item {
impl Item {
pub fn add_to(
node: &Arc<Node>,
uid: String,
type_info: &'static TypeInfo,
specialization: ItemType,
) -> Arc<Self> {
let item = Item {
node: Arc::downgrade(node),
uid: node.uid.clone(),
uid,
type_info,
captured_acceptor: Default::default(),
specialization,

View File

@@ -272,3 +272,8 @@ impl Debug for Node {
.finish()
}
}
impl Drop for Node {
fn drop(&mut self) {
// Debug breakpoint
}
}