Implement __focused__ criteria

This commit is contained in:
Ryan Dwyer 2018-05-11 14:58:24 +10:00
parent 3e1bf721c6
commit 94e42f9857
3 changed files with 171 additions and 42 deletions

View file

@ -79,6 +79,13 @@ uint32_t view_get_x11_window_id(struct sway_view *view) {
return 0;
}
const char *view_get_window_role(struct sway_view *view) {
if (view->impl->get_string_prop) {
return view->impl->get_string_prop(view, VIEW_PROP_WINDOW_ROLE);
}
return NULL;
}
uint32_t view_get_window_type(struct sway_view *view) {
if (view->impl->get_int_prop) {
return view->impl->get_int_prop(view, VIEW_PROP_WINDOW_TYPE);