mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-27 21:58:18 +01:00
commit
e529f09ec9
7 changed files with 304 additions and 25 deletions
12
Cargo.toml
12
Cargo.toml
|
@ -14,12 +14,12 @@ keywords = ["wayland", "compositor", "smithay", "lua"]
|
|||
[dependencies]
|
||||
tracing = "0.1.37"
|
||||
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
|
||||
smithay = { git = "https://github.com/Smithay/smithay", rev = "ae7fb22", features = ["desktop", "wayland_frontend"] }
|
||||
smithay = { git = "https://github.com/Smithay/smithay", rev = "1a61e1c", features = ["desktop", "wayland_frontend"] }
|
||||
smithay-drm-extras = { git = "https://github.com/Smithay/smithay", optional = true }
|
||||
thiserror = "1.0.44"
|
||||
thiserror = "1.0.48"
|
||||
xcursor = { version = "0.3.4", optional = true }
|
||||
image = { version = "0.24.6", default-features = false, optional = true }
|
||||
serde = { version = "1.0.174", features = ["derive"] }
|
||||
image = { version = "0.24.7", default-features = false, optional = true }
|
||||
serde = { version = "1.0.188", features = ["derive"] }
|
||||
rmp = { version = "0.8.12" }
|
||||
rmp-serde = { version = "1.1.2" }
|
||||
calloop = { version = "0.10.1", features = ["executor", "futures-io"] }
|
||||
|
@ -28,8 +28,8 @@ async-process = { version = "1.7.0" }
|
|||
itertools = { version = "0.11.0" }
|
||||
x11rb = { version = "0.12.0", default-features = false, features = ["composite"], optional = true }
|
||||
shellexpand = "3.1.0"
|
||||
toml = "0.7.6"
|
||||
anyhow = { version = "1.0.74", features = ["backtrace"] }
|
||||
toml = "0.7.7"
|
||||
anyhow = { version = "1.0.75", features = ["backtrace"] }
|
||||
clap = { version = "4.4.2", features = ["derive"] }
|
||||
|
||||
[features]
|
||||
|
|
|
@ -487,20 +487,15 @@ fn get_surface_dmabuf_feedback(
|
|||
.collect::<HashSet<_>>();
|
||||
|
||||
let surface = composition.surface();
|
||||
let planes = surface.planes().unwrap();
|
||||
let planes = surface.planes().clone();
|
||||
// We limit the scan-out trache to formats we can also render from
|
||||
// so that there is always a fallback render path available in case
|
||||
// the supplied buffer can not be scanned out directly
|
||||
let planes_formats = surface
|
||||
.supported_formats(planes.primary.handle)
|
||||
.unwrap()
|
||||
let planes_formats = planes
|
||||
.primary
|
||||
.formats
|
||||
.into_iter()
|
||||
.chain(
|
||||
planes
|
||||
.overlay
|
||||
.iter()
|
||||
.flat_map(|p| surface.supported_formats(p.handle).unwrap()),
|
||||
)
|
||||
.chain(planes.overlay.into_iter().flat_map(|p| p.formats))
|
||||
.collect::<HashSet<_>>()
|
||||
.intersection(&all_render_formats)
|
||||
.copied()
|
||||
|
@ -886,13 +881,7 @@ impl State {
|
|||
}
|
||||
};
|
||||
|
||||
let mut planes = match surface.planes() {
|
||||
Ok(planes) => planes,
|
||||
Err(err) => {
|
||||
tracing::warn!("Failed to query surface planes: {}", err);
|
||||
return;
|
||||
}
|
||||
};
|
||||
let mut planes = surface.planes().clone();
|
||||
|
||||
// Using an overlay plane on a nvidia card breaks
|
||||
if driver
|
||||
|
@ -1148,7 +1137,7 @@ impl State {
|
|||
clock,
|
||||
output
|
||||
.current_mode()
|
||||
.map(|mode| mode.refresh as u32)
|
||||
.map(|mode| Duration::from_secs_f64(1000f64 / mode.refresh as f64))
|
||||
.unwrap_or_default(),
|
||||
seq as u64,
|
||||
flags,
|
||||
|
|
|
@ -321,7 +321,9 @@ pub fn run_winit() -> anyhow::Result<()> {
|
|||
time,
|
||||
output
|
||||
.current_mode()
|
||||
.map(|mode| mode.refresh as u32)
|
||||
.map(|mode| {
|
||||
Duration::from_secs_f64(1000f64 / mode.refresh as f64)
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
0,
|
||||
wp_presentation_feedback::Kind::Vsync,
|
||||
|
|
72
src/focus.rs
72
src/focus.rs
|
@ -167,6 +167,78 @@ impl PointerTarget<State> for FocusTarget {
|
|||
FocusTarget::LayerSurface(surf) => PointerTarget::leave(surf, seat, data, serial, time),
|
||||
}
|
||||
}
|
||||
|
||||
fn gesture_swipe_begin(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureSwipeBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_update(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureSwipeUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_end(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureSwipeEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_begin(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GesturePinchBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_update(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GesturePinchUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_end(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GesturePinchEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_begin(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureHoldBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_end(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureHoldEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl KeyboardTarget<State> for FocusTarget {
|
||||
|
|
|
@ -166,6 +166,78 @@ impl PointerGrab<State> for MoveSurfaceGrab<State> {
|
|||
fn start_data(&self) -> &GrabStartData<State> {
|
||||
&self.start_data
|
||||
}
|
||||
|
||||
fn gesture_swipe_begin(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureSwipeBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_update(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureSwipeUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_end(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureSwipeEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_begin(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GesturePinchBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_update(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GesturePinchUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_end(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GesturePinchEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_begin(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureHoldBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_end(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureHoldEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn move_request_client(
|
||||
|
|
|
@ -245,6 +245,78 @@ impl PointerGrab<State> for ResizeSurfaceGrab<State> {
|
|||
fn start_data(&self) -> &GrabStartData<State> {
|
||||
&self.start_data
|
||||
}
|
||||
|
||||
fn gesture_swipe_begin(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureSwipeBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_update(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureSwipeUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_end(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureSwipeEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_begin(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GesturePinchBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_update(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GesturePinchUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_end(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GesturePinchEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_begin(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureHoldBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_end(
|
||||
&mut self,
|
||||
_data: &mut State,
|
||||
_handle: &mut PointerInnerHandle<'_, State>,
|
||||
_event: &smithay::input::pointer::GestureHoldEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Copy, Eq, PartialEq)]
|
||||
|
|
|
@ -369,6 +369,78 @@ impl PointerTarget<State> for WindowElement {
|
|||
WindowElement::X11(surface) => PointerTarget::leave(surface, seat, data, serial, time),
|
||||
}
|
||||
}
|
||||
|
||||
fn gesture_swipe_begin(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureSwipeBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_update(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureSwipeUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_swipe_end(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureSwipeEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_begin(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GesturePinchBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_update(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GesturePinchUpdateEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_pinch_end(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GesturePinchEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_begin(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureHoldBeginEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn gesture_hold_end(
|
||||
&self,
|
||||
_seat: &Seat<State>,
|
||||
_data: &mut State,
|
||||
_event: &smithay::input::pointer::GestureHoldEndEvent,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl KeyboardTarget<State> for WindowElement {
|
||||
|
|
Loading…
Reference in a new issue