mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
Unset input->active_view when view is destroyed
This commit is contained in:
parent
b21f783c34
commit
fbca280949
1 changed files with 10 additions and 0 deletions
|
@ -16,6 +16,16 @@
|
|||
|
||||
void view_destroy(struct roots_view *view) {
|
||||
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) {
|
||||
struct roots_view *_view = desktop->views->items[i];
|
||||
if (view == _view) {
|
||||
|
|
Loading…
Reference in a new issue