File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 60
60
_ => unreachable ! ( ) ,
61
61
}
62
62
}
63
+
64
+ fn destroyed (
65
+ _state : & mut D ,
66
+ _client : wayland_server:: backend:: ClientId ,
67
+ _resource : & ExtSessionLockSurfaceV1 ,
68
+ data : & ExtLockSurfaceUserData ,
69
+ ) {
70
+ if let Ok ( surface) = data. surface . upgrade ( ) {
71
+ compositor:: with_states ( & surface, |states| {
72
+ let mut attributes = states
73
+ . data_map
74
+ . get :: < Mutex < LockSurfaceAttributes > > ( )
75
+ . unwrap ( )
76
+ . lock ( )
77
+ . unwrap ( ) ;
78
+ attributes. reset ( ) ;
79
+ } ) ;
80
+ }
81
+ }
63
82
}
64
83
65
84
/// Attributes for ext-session-lock surfaces.
@@ -113,6 +132,14 @@ impl LockSurfaceAttributes {
113
132
114
133
Some ( configure)
115
134
}
135
+
136
+ fn reset ( & mut self ) {
137
+ self . configure_serial = None ;
138
+ self . server_pending = None ;
139
+ self . pending_configures = Vec :: new ( ) ;
140
+ self . last_acked = None ;
141
+ self . current = Default :: default ( ) ;
142
+ }
116
143
}
117
144
118
145
/// Handle for a ext-session-lock surface.
You can’t perform that action at this time.
0 commit comments