mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-19 20:14:17 +02:00
Fix focussing bug for or views
This commit is contained in:
parent
de6c07ca2a
commit
34412aecad
2 changed files with 12 additions and 8 deletions
5
view.c
5
view.c
|
|
@ -233,7 +233,7 @@ view_unmap(struct cg_view *view) {
|
|||
struct cg_view* prev = view_get_prev_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(seat_get_focus(view->workspace->server->seat) == view) {
|
||||
if(view->workspace->server->seat->seat->keyboard_state.focused_surface == NULL || view->workspace->server->seat->seat->keyboard_state.focused_surface == view->wlr_surface) {
|
||||
seat_set_focus(view->workspace->server->seat, prev);
|
||||
} else {
|
||||
view_tile->view = prev;
|
||||
|
|
@ -246,6 +246,9 @@ view_unmap(struct cg_view *view) {
|
|||
#if CG_HAS_XWAYLAND
|
||||
else {
|
||||
view_damage_whole(view);
|
||||
if(view->workspace->server->seat->seat->keyboard_state.focused_surface == NULL || view->workspace->server->seat->seat->keyboard_state.focused_surface == view->wlr_surface) {
|
||||
seat_set_focus(view->workspace->server->seat, view->workspace->server->seat->focused_view);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue