55mod foreign_toplevel;
66pub mod foreign_toplevel_list;
77pub mod idle;
8+ mod image_capture_source;
9+ pub mod image_copy_capture;
810pub mod session_lock;
911#[ cfg( feature = "snowcap" ) ]
1012pub mod snowcap_decoration;
@@ -214,9 +216,7 @@ impl CompositorHandler for State {
214216 }
215217
216218 // Window surface commit
217- if let Some ( window) = self . pinnacle . window_for_surface ( surface) . cloned ( )
218- && window. is_wayland ( )
219- {
219+ if let Some ( window) = self . pinnacle . window_for_surface ( surface) . cloned ( ) {
220220 let Some ( is_mapped) =
221221 with_renderer_surface_state ( surface, |state| state. buffer ( ) . is_some ( ) )
222222 else {
@@ -225,28 +225,30 @@ impl CompositorHandler for State {
225225
226226 window. on_commit ( ) ;
227227
228- // Toplevel has become unmapped,
229- // see https://wayland.app/protocols/xdg-shell#xdg_toplevel
230- if !is_mapped {
231- self . pinnacle . remove_window ( & window, true ) ;
228+ if window. is_wayland ( ) {
229+ // Toplevel has become unmapped,
230+ // see https://wayland.app/protocols/xdg-shell#xdg_toplevel
231+ if !is_mapped {
232+ self . pinnacle . remove_window ( & window, true ) ;
232233
233- let output = window. output ( & self . pinnacle ) ;
234+ let output = window. output ( & self . pinnacle ) ;
234235
235- if let Some ( output) = output {
236- self . pinnacle . request_layout ( & output) ;
236+ if let Some ( output) = output {
237+ self . pinnacle . request_layout ( & output) ;
238+ }
237239 }
238- }
239240
240- // Update reactive popups
241- for ( popup, _) in PopupManager :: popups_for_surface ( surface) {
242- if let PopupKind :: Xdg ( popup) = popup
243- && popup. with_pending_state ( |state| state. positioner . reactive )
244- {
245- if let Err ( err) = self . pinnacle . position_popup ( & popup) {
246- debug ! ( "Failed to position reactive popup: {err}" ) ;
247- }
248- if let Err ( err) = popup. send_configure ( ) {
249- warn ! ( "Failed to configure reactive popup: {err}" ) ;
241+ // Update reactive popups
242+ for ( popup, _) in PopupManager :: popups_for_surface ( surface) {
243+ if let PopupKind :: Xdg ( popup) = popup
244+ && popup. with_pending_state ( |state| state. positioner . reactive )
245+ {
246+ if let Err ( err) = self . pinnacle . position_popup ( & popup) {
247+ debug ! ( "Failed to position reactive popup: {err}" ) ;
248+ }
249+ if let Err ( err) = popup. send_configure ( ) {
250+ warn ! ( "Failed to configure reactive popup: {err}" ) ;
251+ }
250252 }
251253 }
252254 }
0 commit comments