From 7c9f3240f67ebb9e5070ab41b9d8c23951df977e Mon Sep 17 00:00:00 2001 From: emersion Date: Fri, 29 Sep 2017 20:22:35 +0200 Subject: [PATCH] xwayland: add set_parent event --- include/wlr/xwayland.h | 1 + xwayland/xwm.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index 4e59d9c5..f2484889 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -52,6 +52,7 @@ struct wlr_xwayland_surface { struct wl_signal set_title; struct wl_signal set_class; + struct wl_signal set_parent; } events; void *data; diff --git a/xwayland/xwm.c b/xwayland/xwm.c index b8eefa4b..d1e41b3c 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -64,6 +64,7 @@ static struct wlr_xwayland_surface *wlr_xwayland_surface_create( wl_signal_init(&surface->events.request_configure); wl_signal_init(&surface->events.set_class); wl_signal_init(&surface->events.set_title); + wl_signal_init(&surface->events.set_parent); return surface; } @@ -156,6 +157,7 @@ static void read_surface_parent(struct wlr_xwm *xwm, } wlr_log(L_DEBUG, "XCB_ATOM_WM_TRANSIENT_FOR: %p", xid); + wl_signal_emit(&surface->events.set_parent, surface); } static void read_surface_property(struct wlr_xwm *xwm,