fix watch z-order on openvr
This commit is contained in:
@@ -9,6 +9,7 @@ use vulkano::{Handle, VulkanObject};
|
|||||||
use crate::{
|
use crate::{
|
||||||
backend::overlay::{OverlayData, RelativeTo},
|
backend::overlay::{OverlayData, RelativeTo},
|
||||||
graphics::WlxGraphics,
|
graphics::WlxGraphics,
|
||||||
|
overlays::watch::WATCH_NAME,
|
||||||
state::AppState,
|
state::AppState,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -42,7 +43,7 @@ impl OverlayData<OpenVrOverlayData> {
|
|||||||
log::debug!("{}: initialize", self.state.name);
|
log::debug!("{}: initialize", self.state.name);
|
||||||
|
|
||||||
//watch
|
//watch
|
||||||
if self.state.id == 0 {
|
if *self.state.name == *WATCH_NAME {
|
||||||
self.data.sort_order = 68;
|
self.data.sort_order = 68;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ use crate::{
|
|||||||
state::AppState,
|
state::AppState,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const WATCH_NAME: &str = "watch";
|
||||||
|
|
||||||
pub fn create_watch<O>(state: &AppState, screens: &[OverlayData<O>]) -> OverlayData<O>
|
pub fn create_watch<O>(state: &AppState, screens: &[OverlayData<O>]) -> OverlayData<O>
|
||||||
where
|
where
|
||||||
O: Default,
|
O: Default,
|
||||||
@@ -168,7 +170,7 @@ where
|
|||||||
|
|
||||||
OverlayData {
|
OverlayData {
|
||||||
state: OverlayState {
|
state: OverlayState {
|
||||||
name: "Watch".into(),
|
name: WATCH_NAME.into(),
|
||||||
size: (400, 200),
|
size: (400, 200),
|
||||||
want_visible: true,
|
want_visible: true,
|
||||||
spawn_scale: 0.11 * state.session.config.watch_scale,
|
spawn_scale: 0.11 * state.session.config.watch_scale,
|
||||||
|
|||||||
Reference in New Issue
Block a user