Use parent get_root_coords in subsurfaces

Subsurfaces need access to the parent get_root_coords impl for positioning in
popups. To do this, we store a reference to the parent view_child where
applicable.

Fixes #4191.
This commit is contained in:
Kenny Levinsen 2019-05-29 16:08:48 +02:00 committed by Brian Ashworth
parent c3532bc8a1
commit 4925882920
2 changed files with 54 additions and 9 deletions

View file

@ -192,8 +192,11 @@ struct sway_view_child_impl {
*/
struct sway_view_child {
const struct sway_view_child_impl *impl;
struct wl_list link;
struct sway_view *view;
struct sway_view_child *parent;
struct wl_list children; // sway_view_child::link
struct wlr_surface *surface;
bool mapped;