state: Use WeakOutput for frame trottling
This commit is contained in:
parent
cbc4ad6fc2
commit
793bb17d47
1 changed files with 3 additions and 3 deletions
|
|
@ -59,7 +59,7 @@ use smithay::{
|
||||||
PopupManager,
|
PopupManager,
|
||||||
},
|
},
|
||||||
input::{pointer::CursorImageStatus, SeatState},
|
input::{pointer::CursorImageStatus, SeatState},
|
||||||
output::{Output, Scale},
|
output::{Output, Scale, WeakOutput},
|
||||||
reexports::{
|
reexports::{
|
||||||
calloop::{LoopHandle, LoopSignal},
|
calloop::{LoopHandle, LoopSignal},
|
||||||
wayland_protocols::xdg::shell::server::xdg_toplevel::WmCapabilities,
|
wayland_protocols::xdg::shell::server::xdg_toplevel::WmCapabilities,
|
||||||
|
|
@ -271,7 +271,7 @@ pub struct SurfaceDmabufFeedback {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct SurfaceFrameThrottlingState {
|
struct SurfaceFrameThrottlingState {
|
||||||
last_sent_at: RefCell<Option<(Output, usize)>>,
|
last_sent_at: RefCell<Option<(WeakOutput, usize)>>,
|
||||||
}
|
}
|
||||||
impl Default for SurfaceFrameThrottlingState {
|
impl Default for SurfaceFrameThrottlingState {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
|
|
@ -985,7 +985,7 @@ impl Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
if send {
|
if send {
|
||||||
*last_sent_at = Some((output.clone(), sequence));
|
*last_sent_at = Some((output.downgrade(), sequence));
|
||||||
Some(output.clone())
|
Some(output.clone())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue