fix alpha, remove sound for dbus toasts
This commit is contained in:
@@ -158,7 +158,7 @@ impl NotificationManager {
|
||||
|
||||
let toast = Toast::new(msg.title, msg.content.unwrap_or_else(|| "".into()))
|
||||
.with_timeout(msg.timeout.unwrap_or(5.))
|
||||
.with_sound(msg.volume.unwrap_or(0.) > 0.1);
|
||||
.with_sound(msg.volume.unwrap_or(-1.) >= 0.); // XSOverlay still plays at 0,
|
||||
|
||||
match sender.try_send(toast) {
|
||||
Ok(_) => {}
|
||||
@@ -187,9 +187,9 @@ fn parse_dbus(msg: &dbus::Message) -> anyhow::Result<Toast> {
|
||||
};
|
||||
|
||||
Ok(Toast::new(title.into(), body.into())
|
||||
.with_sound(true)
|
||||
.with_timeout(5.0)
|
||||
.with_opacity(1.0))
|
||||
// leave the audio part to the desktop env
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
|
||||
@@ -173,8 +173,6 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
|
||||
continue;
|
||||
};
|
||||
|
||||
log::info!("Creating overlay: {}", state.name);
|
||||
|
||||
overlays.add(OverlayData {
|
||||
state,
|
||||
backend,
|
||||
@@ -183,7 +181,6 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
|
||||
}
|
||||
TaskType::DropOverlay(sel) => {
|
||||
if let Some(o) = overlays.mut_by_selector(&sel) {
|
||||
log::info!("Dropping overlay: {}", o.state.name);
|
||||
o.destroy(&mut overlay_mngr);
|
||||
overlays.drop_by_selector(&sel);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use openxr as xr;
|
||||
use smallvec::SmallVec;
|
||||
use vulkano::{
|
||||
image::{sampler::Filter, sys::RawImage, view::ImageView, ImageCreateInfo, ImageUsage},
|
||||
pipeline::graphics::color_blend::AttachmentBlend,
|
||||
Handle,
|
||||
};
|
||||
|
||||
@@ -38,6 +39,7 @@ pub(super) fn create_swapchain_render_data(
|
||||
shaders.get("vert_common").unwrap().clone(), // want panic
|
||||
shaders.get("frag_srgb").unwrap().clone(), // want panic
|
||||
graphics.native_format,
|
||||
Some(AttachmentBlend::alpha()),
|
||||
)?;
|
||||
|
||||
let images = swapchain
|
||||
|
||||
Reference in New Issue
Block a user