diff options
author | Franklin "Snaipe" Mathieu <snaipe@diacritic.io> | 2018-10-22 20:17:27 +0100 |
---|---|---|
committer | Franklin "Snaipe" Mathieu <snaipe@diacritic.io> | 2018-10-23 19:10:50 +0100 |
commit | 8fc932833499552bdc8f776b8f5ba9551ae45423 (patch) | |
tree | 0fc94558441eaf6d1789801331e6280315a523f3 /sway/tree | |
parent | 429787510e0c5b519d438fbd98582977c8d75e2f (diff) |
xwayland: populate window_properties in json for views
window_properties is documented to contain a subset of the X11 properties
of a window (its title, class, instance, role, and transient ID). This
commit adds the missing json object from the get_tree output for
xwayland windows only.
This is a follow-up of #2911.
Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/view.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index b23afb97..3698d7d5 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -116,6 +116,13 @@ uint32_t view_get_x11_window_id(struct sway_view *view) { } return 0; } + +uint32_t view_get_x11_parent_id(struct sway_view *view) { + if (view->impl->get_int_prop) { + return view->impl->get_int_prop(view, VIEW_PROP_X11_PARENT_ID); + } + return 0; +} #endif const char *view_get_window_role(struct sway_view *view) { if (view->impl->get_string_prop) { |