@@ -32,19 +32,6 @@ impl WaylandState {
3232 } )
3333 }
3434
35- pub ( crate ) fn toplevel_title ( surface : & ToplevelSurface ) -> Option < String > {
36- let wl_surface = surface. wl_surface ( ) ;
37- smithay:: wayland:: compositor:: with_states ( & wl_surface, |states| {
38- states
39- . data_map
40- . get :: < smithay:: wayland:: shell:: xdg:: XdgToplevelSurfaceData > ( ) ?
41- . lock ( )
42- . ok ( ) ?
43- . title
44- . clone ( )
45- } )
46- }
47-
4835 /// Get the app_id (desktop file ID) of a window.
4936 pub fn window_app_id ( & self , window : WindowId ) -> Option < String > {
5037 let element = self . window_index . get ( & window) ?;
@@ -66,30 +53,6 @@ impl WaylandState {
6653 } )
6754 }
6855
69- pub ( crate ) fn toplevel_app_id ( surface : & ToplevelSurface ) -> Option < String > {
70- let wl_surface = surface. wl_surface ( ) ;
71- smithay:: wayland:: compositor:: with_states ( & wl_surface, |states| {
72- states
73- . data_map
74- . get :: < smithay:: wayland:: shell:: xdg:: XdgToplevelSurfaceData > ( ) ?
75- . lock ( )
76- . ok ( ) ?
77- . app_id
78- . clone ( )
79- } )
80- }
81-
82- /// Detect helper toplevels that should stay outside WM client management.
83- ///
84- /// `wl-clipboard` creates a 1x1 fully transparent `xdg_toplevel` as a
85- /// focus-acquisition hack when data-control is unavailable. Managing that
86- /// surface like a normal client causes pointless layout churn.
87- pub ( crate ) fn is_unmanaged_wayland_overlay ( surface : & ToplevelSurface ) -> bool {
88- let app_id = Self :: toplevel_app_id ( surface) . unwrap_or_default ( ) ;
89- let title = Self :: toplevel_title ( surface) . unwrap_or_default ( ) ;
90- app_id == "io.github.bugaevc.wl-clipboard" || title == "wl-clipboard"
91- }
92-
9356 /// Create a foreign toplevel handle for a window.
9457 pub ( crate ) fn create_foreign_toplevel ( & mut self , window : WindowId ) {
9558 let title = self . window_title ( window) . unwrap_or_default ( ) ;
0 commit comments