mirror of
https://github.com/wizbright/waybox.git
synced 2026-03-21 05:33:55 -04:00
Focus previous view on close
This commit is contained in:
parent
7191191377
commit
0bb5787a10
1 changed files with 5 additions and 0 deletions
|
|
@ -48,6 +48,11 @@ static void xdg_surface_unmap(struct wl_listener *listener, void *data) {
|
||||||
/* Called when the surface is unmapped, and should no longer be shown. */
|
/* Called when the surface is unmapped, and should no longer be shown. */
|
||||||
struct wb_view *view = wl_container_of(listener, view, unmap);
|
struct wb_view *view = wl_container_of(listener, view, unmap);
|
||||||
view->mapped = false;
|
view->mapped = false;
|
||||||
|
|
||||||
|
/* Focus previous view's surface, if any */
|
||||||
|
if (view->server->views.prev) {
|
||||||
|
focus_view((struct wb_view *) view->server->views.prev, ((struct wb_view *) view->server->views.prev)->xdg_surface->surface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xdg_surface_destroy(struct wl_listener *listener, void *data) {
|
static void xdg_surface_destroy(struct wl_listener *listener, void *data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue