Merge pull request #26 from pop-os/remove-surface_jammy

This commit is contained in:
Victoria Brekenfeld 2022-07-16 02:34:45 -06:00 committed by GitHub
commit a6417fe2ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ pub fn display_configuration(
.iter()
.flat_map(|conn| device.get_connector(*conn).ok())
{
if let Some(enc) = device.get_connector(conn.handle())?.current_encoder() {
if let Some(enc) = conn.current_encoder() {
if let Some(crtc) = device.get_encoder(enc)?.crtc() {
// If is is connected we found a mapping
if conn.state() == ConnectorState::Connected {

View file

@ -478,8 +478,8 @@ impl State {
let changes = device.enumerate_surfaces()?;
let mut w = self.common.shell.global_space().size.w;
for crtc in changes.removed {
if let Some(surface) = device.surfaces.get_mut(&crtc) {
if let Some(token) = surface.render_timer_token.take() {
if let Some(surface) = device.surfaces.remove(&crtc) {
if let Some(token) = surface.render_timer_token {
self.common.event_loop_handle.remove(token);
}
w -= surface.output.current_mode().map(|m| m.size.w).unwrap_or(0);