mirror of https://github.com/wayvr-org/wayvr.git
wvr_server: actually create ViewporterState
This commit is contained in:
parent
8f09a13917
commit
b45c8656bc
|
|
@ -31,6 +31,7 @@ use smithay::wayland::shell::kde::decoration::{KdeDecorationHandler, KdeDecorati
|
|||
use smithay::wayland::shell::xdg::decoration::{XdgDecorationHandler, XdgDecorationState};
|
||||
use smithay::wayland::shm::{ShmHandler, ShmState, with_buffer_contents};
|
||||
use smithay::wayland::single_pixel_buffer::get_single_pixel_buffer;
|
||||
use smithay::wayland::viewporter::ViewporterState;
|
||||
use smithay::{
|
||||
delegate_compositor, delegate_data_control, delegate_data_device, delegate_dmabuf,
|
||||
delegate_ext_data_control, delegate_kde_decoration, delegate_output,
|
||||
|
|
@ -77,10 +78,13 @@ pub struct Application {
|
|||
pub primary_selection_state: PrimarySelectionState,
|
||||
pub ext_data_control_state: selection_ext::DataControlState,
|
||||
pub wlr_data_control_state: selection_wlr::DataControlState,
|
||||
#[allow(dead_code)]
|
||||
pub xdg_decoration_state: XdgDecorationState,
|
||||
pub kde_decoration_state: KdeDecorationState,
|
||||
pub wayvr_tasks: SyncEventQueue<WayVRTask>,
|
||||
pub popup_manager: PopupManager,
|
||||
#[allow(dead_code)]
|
||||
pub viewporter: ViewporterState,
|
||||
pub display_handle: DisplayHandle,
|
||||
pub redraw_requests: HashSet<ObjectId>,
|
||||
pub pending_frame_callbacks: HashMap<ObjectId, Vec<wl_callback::WlCallback>>,
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ use smithay::{
|
|||
},
|
||||
},
|
||||
shm::ShmState,
|
||||
viewporter::ViewporterState,
|
||||
},
|
||||
};
|
||||
use std::{
|
||||
|
|
@ -170,6 +171,7 @@ impl WvrServerState {
|
|||
let xdg_decoration_state = XdgDecorationState::new::<Application>(&dh);
|
||||
let kde_decoration_state =
|
||||
KdeDecorationState::new::<Application>(&dh, kde_decoration::Mode::Server);
|
||||
let viewporter = ViewporterState::new::<Application>(&dh);
|
||||
|
||||
let dummy_milli_hz = 60000; /* refresh rate in millihertz */
|
||||
|
||||
|
|
@ -251,6 +253,7 @@ impl WvrServerState {
|
|||
wayvr_tasks: tasks.clone(),
|
||||
dmabuf_state,
|
||||
popup_manager: PopupManager::default(),
|
||||
viewporter,
|
||||
redraw_requests: HashSet::new(),
|
||||
pending_frame_callbacks: HashMap::new(),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue