File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ impl SeatWrapper {
108108 touches : Mutex :: new ( FxHashMap :: default ( ) ) ,
109109 }
110110 }
111+ pub fn unfocus_internal_state ( & self , surface : & WlSurface ) {
112+ let Some ( state) = self . wayland_state . upgrade ( ) else {
113+ return ;
114+ } ;
115+ self . unfocus ( surface, & mut state. lock ( ) ) ;
116+ }
111117 pub fn unfocus ( & self , surface : & WlSurface , state : & mut WaylandState ) {
112118 let pointer = self . seat . get_pointer ( ) . unwrap ( ) ;
113119 if pointer. current_focus ( ) == Some ( surface. clone ( ) ) {
Original file line number Diff line number Diff line change @@ -472,6 +472,7 @@ impl Backend for XdgBackend {
472472
473473 fn close_toplevel ( & self ) {
474474 if let Some ( toplevel) = self . toplevel . lock ( ) . clone ( ) {
475+ self . seat . unfocus_internal_state ( toplevel. wl_surface ( ) ) ;
475476 toplevel. send_close ( ) ;
476477 }
477478 }
You can’t perform that action at this time.
0 commit comments