mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-20 20:44:18 +02:00
Improve view_unmap algorithmics
This commit is contained in:
parent
e2a21b215f
commit
5cb26b8063
1 changed files with 5 additions and 8 deletions
13
view.c
13
view.c
|
|
@ -276,15 +276,12 @@ view_unmap(struct cg_view *view) {
|
|||
struct cg_view *prev = view_get_prev_view(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) &&
|
||||
view->workspace->server->curr_output
|
||||
->workspaces[view->workspace->server->curr_output
|
||||
->curr_workspace]
|
||||
->focused_tile == view_tile) {
|
||||
if(view == view->workspace->server->seat->focused_view) {
|
||||
seat_set_focus(view->workspace->server->seat, prev);
|
||||
} else if(view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == view->wlr_surface) {
|
||||
wlr_seat_keyboard_clear_focus(view->workspace->server->seat->seat);
|
||||
seat_set_focus(view->workspace->server->seat, view->workspace->server->seat->focused_view);
|
||||
} else {
|
||||
view_tile->view = prev;
|
||||
if(prev != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue