mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-19 20:14:17 +02:00
Fix crash on view destroy
This commit is contained in:
parent
1a87477e19
commit
e7ca6d693f
1 changed files with 8 additions and 4 deletions
12
view.c
12
view.c
|
|
@ -234,10 +234,14 @@ view_unmap(struct cg_view *view) {
|
|||
struct cg_tile *view_tile = view_get_tile(view);
|
||||
wlr_output_damage_add_box(view_tile->workspace->output->damage,
|
||||
&view_tile->tile);
|
||||
if(view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == NULL ||
|
||||
view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == view->wlr_surface) {
|
||||
if((view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == NULL ||
|
||||
view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == view->wlr_surface) &&
|
||||
view->workspace->server->curr_output
|
||||
->workspaces[view->workspace->server->curr_output
|
||||
->curr_workspace]
|
||||
->focused_tile == view_tile) {
|
||||
seat_set_focus(view->workspace->server->seat, prev);
|
||||
} else {
|
||||
view_tile->view = prev;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue