From bffcb496cc002d9c8a41285eaabd908b322a9c99 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 13 May 2018 08:17:46 +1000 Subject: Revert "Revert "Merge pull request #1953 from RyanDwyer/criteria-focused"" This reverts commit ac0e62584f6101277b76622a7274866cd50f615c. This reimplements the criteria __focused__ commit in preparation for fixing a known bug. --- sway/tree/view.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sway/tree/view.c') diff --git a/sway/tree/view.c b/sway/tree/view.c index 8fc45f52..f872bef6 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -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); -- cgit v1.2.3-54-g00ecf