From 8fc932833499552bdc8f776b8f5ba9551ae45423 Mon Sep 17 00:00:00 2001 From: "Franklin \"Snaipe\" Mathieu" Date: Mon, 22 Oct 2018 20:17:27 +0100 Subject: 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 --- sway/desktop/xwayland.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sway/desktop/xwayland.c') diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index b8ac8434..a8fbd574 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -171,6 +171,11 @@ static uint32_t get_int_prop(struct sway_view *view, enum sway_view_prop prop) { switch (prop) { case VIEW_PROP_X11_WINDOW_ID: return view->wlr_xwayland_surface->window_id; + case VIEW_PROP_X11_PARENT_ID: + if (view->wlr_xwayland_surface->parent) { + return view->wlr_xwayland_surface->parent->window_id; + } + return 0; case VIEW_PROP_WINDOW_TYPE: return *view->wlr_xwayland_surface->window_type; default: -- cgit v1.2.3-54-g00ecf