Unset input->active_view when view is destroyed
This commit is contained in:
parent
b21f783c34
commit
fbca280949
|
@ -16,6 +16,16 @@
|
||||||
|
|
||||||
void view_destroy(struct roots_view *view) {
|
void view_destroy(struct roots_view *view) {
|
||||||
struct roots_desktop *desktop = view->desktop;
|
struct roots_desktop *desktop = view->desktop;
|
||||||
|
|
||||||
|
struct roots_input *input = desktop->server->input;
|
||||||
|
if (input->active_view == view) {
|
||||||
|
input->active_view = NULL;
|
||||||
|
input->mode = ROOTS_CURSOR_PASSTHROUGH;
|
||||||
|
}
|
||||||
|
if (input->last_active_view == view) {
|
||||||
|
input->last_active_view = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < desktop->views->length; ++i) {
|
for (size_t i = 0; i < desktop->views->length; ++i) {
|
||||||
struct roots_view *_view = desktop->views->items[i];
|
struct roots_view *_view = desktop->views->items[i];
|
||||||
if (view == _view) {
|
if (view == _view) {
|
||||||
|
|
Loading…
Reference in New Issue