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/desktop/xwayland.c | |
parent | Merge pull request #2909 from makepanic/issues/2906 (diff) | |
download | sway-8fc932833499552bdc8f776b8f5ba9551ae45423.tar.gz sway-8fc932833499552bdc8f776b8f5ba9551ae45423.tar.zst sway-8fc932833499552bdc8f776b8f5ba9551ae45423.zip |
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/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) { | |||
171 | switch (prop) { | 171 | switch (prop) { |
172 | case VIEW_PROP_X11_WINDOW_ID: | 172 | case VIEW_PROP_X11_WINDOW_ID: |
173 | return view->wlr_xwayland_surface->window_id; | 173 | return view->wlr_xwayland_surface->window_id; |
174 | case VIEW_PROP_X11_PARENT_ID: | ||
175 | if (view->wlr_xwayland_surface->parent) { | ||
176 | return view->wlr_xwayland_surface->parent->window_id; | ||
177 | } | ||
178 | return 0; | ||
174 | case VIEW_PROP_WINDOW_TYPE: | 179 | case VIEW_PROP_WINDOW_TYPE: |
175 | return *view->wlr_xwayland_surface->window_type; | 180 | return *view->wlr_xwayland_surface->window_type; |
176 | default: | 181 | default: |