mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-15 15:42:06 +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]
|
[dependencies]
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
|
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 }
|
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 }
|
xcursor = { version = "0.3.4", optional = true }
|
||||||
image = { version = "0.24.6", default-features = false, optional = true }
|
image = { version = "0.24.7", default-features = false, optional = true }
|
||||||
serde = { version = "1.0.174", features = ["derive"] }
|
serde = { version = "1.0.188", features = ["derive"] }
|
||||||
rmp = { version = "0.8.12" }
|
rmp = { version = "0.8.12" }
|
||||||
rmp-serde = { version = "1.1.2" }
|
rmp-serde = { version = "1.1.2" }
|
||||||
calloop = { version = "0.10.1", features = ["executor", "futures-io"] }
|
calloop = { version = "0.10.1", features = ["executor", "futures-io"] }
|
||||||
|
@ -28,8 +28,8 @@ async-process = { version = "1.7.0" }
|
||||||
itertools = { version = "0.11.0" }
|
itertools = { version = "0.11.0" }
|
||||||
x11rb = { version = "0.12.0", default-features = false, features = ["composite"], optional = true }
|
x11rb = { version = "0.12.0", default-features = false, features = ["composite"], optional = true }
|
||||||
shellexpand = "3.1.0"
|
shellexpand = "3.1.0"
|
||||||
toml = "0.7.6"
|
toml = "0.7.7"
|
||||||
anyhow = { version = "1.0.74", features = ["backtrace"] }
|
anyhow = { version = "1.0.75", features = ["backtrace"] }
|
||||||
clap = { version = "4.4.2", features = ["derive"] }
|
clap = { version = "4.4.2", features = ["derive"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -487,20 +487,15 @@ fn get_surface_dmabuf_feedback(
|
||||||
.collect::<HashSet<_>>();
|
.collect::<HashSet<_>>();
|
||||||
|
|
||||||
let surface = composition.surface();
|
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
|
// 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
|
// so that there is always a fallback render path available in case
|
||||||
// the supplied buffer can not be scanned out directly
|
// the supplied buffer can not be scanned out directly
|
||||||
let planes_formats = surface
|
let planes_formats = planes
|
||||||
.supported_formats(planes.primary.handle)
|
.primary
|
||||||
.unwrap()
|
.formats
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.chain(
|
.chain(planes.overlay.into_iter().flat_map(|p| p.formats))
|
||||||
planes
|
|
||||||
.overlay
|
|
||||||
.iter()
|
|
||||||
.flat_map(|p| surface.supported_formats(p.handle).unwrap()),
|
|
||||||
)
|
|
||||||
.collect::<HashSet<_>>()
|
.collect::<HashSet<_>>()
|
||||||
.intersection(&all_render_formats)
|
.intersection(&all_render_formats)
|
||||||
.copied()
|
.copied()
|
||||||
|
@ -886,13 +881,7 @@ impl State {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut planes = match surface.planes() {
|
let mut planes = surface.planes().clone();
|
||||||
Ok(planes) => planes,
|
|
||||||
Err(err) => {
|
|
||||||
tracing::warn!("Failed to query surface planes: {}", err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Using an overlay plane on a nvidia card breaks
|
// Using an overlay plane on a nvidia card breaks
|
||||||
if driver
|
if driver
|
||||||
|
@ -1148,7 +1137,7 @@ impl State {
|
||||||
clock,
|
clock,
|
||||||
output
|
output
|
||||||
.current_mode()
|
.current_mode()
|
||||||
.map(|mode| mode.refresh as u32)
|
.map(|mode| Duration::from_secs_f64(1000f64 / mode.refresh as f64))
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
seq as u64,
|
seq as u64,
|
||||||
flags,
|
flags,
|
||||||
|
|
|
@ -321,7 +321,9 @@ pub fn run_winit() -> anyhow::Result<()> {
|
||||||
time,
|
time,
|
||||||
output
|
output
|
||||||
.current_mode()
|
.current_mode()
|
||||||
.map(|mode| mode.refresh as u32)
|
.map(|mode| {
|
||||||
|
Duration::from_secs_f64(1000f64 / mode.refresh as f64)
|
||||||
|
})
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
0,
|
0,
|
||||||
wp_presentation_feedback::Kind::Vsync,
|
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),
|
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 {
|
impl KeyboardTarget<State> for FocusTarget {
|
||||||
|
|
|
@ -166,6 +166,78 @@ impl PointerGrab<State> for MoveSurfaceGrab<State> {
|
||||||
fn start_data(&self) -> &GrabStartData<State> {
|
fn start_data(&self) -> &GrabStartData<State> {
|
||||||
&self.start_data
|
&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(
|
pub fn move_request_client(
|
||||||
|
|
|
@ -245,6 +245,78 @@ impl PointerGrab<State> for ResizeSurfaceGrab<State> {
|
||||||
fn start_data(&self) -> &GrabStartData<State> {
|
fn start_data(&self) -> &GrabStartData<State> {
|
||||||
&self.start_data
|
&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)]
|
#[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),
|
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 {
|
impl KeyboardTarget<State> for WindowElement {
|
||||||
|
|
Loading…
Reference in a new issue