Revert "Revert "Merge pull request #1953 from RyanDwyer/criteria-focused""

This reverts commit ac0e62584f.

This reimplements the criteria __focused__ commit in preparation for
fixing a known bug.
This commit is contained in:
Ryan Dwyer 2018-05-13 08:17:46 +10:00
parent 1e9aaa54a8
commit bffcb496cc
3 changed files with 171 additions and 42 deletions

View file

@ -81,6 +81,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);