mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-22 21:44:19 +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
15
seat.c
15
seat.c
|
|
@ -1089,22 +1089,25 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view) {
|
|||
}
|
||||
}
|
||||
|
||||
if(prev_view == view) {
|
||||
if(seat->seat->keyboard_state.focused_surface == view->wlr_surface) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if CG_HAS_XWAYLAND
|
||||
if(view->type == CG_XWAYLAND_VIEW) {
|
||||
if(view->type == CG_XWAYLAND_VIEW && ! xwayland_view_should_manage(view)) {
|
||||
const struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view);
|
||||
if(!wlr_xwayland_or_surface_wants_focus(
|
||||
xwayland_view->xwayland_surface)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if(prev_view != NULL) {
|
||||
view_activate(prev_view, false);
|
||||
}
|
||||
|
||||
if(prev_view != NULL) {
|
||||
view_activate(prev_view, false);
|
||||
seat->focused_view = view;
|
||||
}
|
||||
|
||||
view_activate(view, true);
|
||||
|
|
@ -1123,7 +1126,5 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view) {
|
|||
NULL);
|
||||
}
|
||||
|
||||
seat->focused_view = view;
|
||||
|
||||
process_cursor_motion(seat, -1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue