Merge pull request #2933 from Snaipe/xwayland-window-properties

xwayland: populate window_properties in json for views
This commit is contained in:
Drew DeVault 2018-10-24 01:13:15 +02:00 committed by GitHub
commit bdb176863c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 0 deletions

View file

@ -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: