mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
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>
This commit is contained in:
parent
429787510e
commit
8fc9328334
4 changed files with 38 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue