diff --git a/src/xwayland-unmanaged.c b/src/xwayland-unmanaged.c index 64a83cca..56befc90 100644 --- a/src/xwayland-unmanaged.c +++ b/src/xwayland-unmanaged.c @@ -88,6 +88,12 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data) return; } } + /* + * If we don't find a surface to focus fall back + * to the topmost mapped view. This fixes dmenu + * not giving focus back when closed with ESC. + */ + desktop_focus_topmost_mapped_view(unmanaged->server); } static void