mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
Move isfocusable() from desktop.c to view.c
This commit is contained in:
parent
602d59a3b2
commit
e5a6c57a6e
5 changed files with 29 additions and 24 deletions
11
src/view.c
11
src/view.c
|
|
@ -22,7 +22,7 @@
|
|||
static bool
|
||||
matches_criteria(struct view *view, enum lab_view_criteria criteria)
|
||||
{
|
||||
if (!isfocusable(view)) {
|
||||
if (!view_isfocusable(view)) {
|
||||
return false;
|
||||
}
|
||||
if (criteria & LAB_VIEW_CRITERIA_CURRENT_WORKSPACE) {
|
||||
|
|
@ -80,6 +80,15 @@ view_array_append(struct server *server, struct wl_array *views,
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
view_isfocusable(struct view *view)
|
||||
{
|
||||
if (!view->surface) {
|
||||
return false;
|
||||
}
|
||||
return (view->mapped || view->minimized);
|
||||
}
|
||||
|
||||
/**
|
||||
* All view_apply_xxx_geometry() functions must *not* modify
|
||||
* any state besides repositioning or resizing the view.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue