mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
desktop: simplify desktop_focus_and_activate_view()
...following view->surface checks in 295d5172
This commit is contained in:
parent
f7b63f264e
commit
a47931bba2
1 changed files with 11 additions and 2 deletions
|
|
@ -103,7 +103,16 @@ desktop_focus_and_activate_view(struct seat *seat, struct view *view)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (view->surface && input_inhibit_blocks_surface(seat, view->surface->resource)) {
|
/*
|
||||||
|
* Guard against views with no mapped surfaces when handling
|
||||||
|
* 'request_activate' and 'request_minimize'.
|
||||||
|
* See notes by isfocusable()
|
||||||
|
*/
|
||||||
|
if (!view->surface) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input_inhibit_blocks_surface(seat, view->surface->resource)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,7 +125,7 @@ desktop_focus_and_activate_view(struct seat *seat, struct view *view)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!view->mapped || !view->surface) {
|
if (!view->mapped) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue