mirror of
https://github.com/servo/servo.git
synced 2025-07-21 22:33:41 +01:00
Stop animations when window is hidden (API + UWP)
This commit is contained in:
parent
5597ccf57d
commit
6ddde1a3e1
11 changed files with 77 additions and 0 deletions
|
@ -735,6 +735,19 @@ where
|
|||
);
|
||||
}
|
||||
},
|
||||
|
||||
WindowEvent::ChangeBrowserVisibility(top_level_browsing_context_id, visible) => {
|
||||
let msg = ConstellationMsg::ChangeBrowserVisibility(
|
||||
top_level_browsing_context_id,
|
||||
visible,
|
||||
);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!(
|
||||
"Sending ChangeBrowserVisibility to constellation failed ({:?}).",
|
||||
e
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue