diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-10-24 19:16:50 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-10-24 19:16:50 -0400 |
commit | 7643765e7b34b719969231a70f7744d2846dfff6 (patch) | |
tree | d482a0307e7cdd80d4b74c2a785fc425e2181927 | |
parent | 3277c6d994508aefdfb19a64069cc3be6a92e5b4 (diff) |
xwm: unpaired surface list cleanup
-rw-r--r-- | xwayland/xwm.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 7cdc84c5..160a1927 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -47,17 +47,6 @@ static struct wlr_xwayland_surface *lookup_surface(struct wlr_xwm *xwm, return NULL; } -static struct wlr_xwayland_surface *lookup_unpaired_surface(struct wlr_xwm *xwm, - xcb_window_t window_id) { - struct wlr_xwayland_surface *surface; - wl_list_for_each(surface, &xwm->unpaired_surfaces, unpaired_link) { - if (surface->window_id == window_id) { - return surface; - } - } - return NULL; -} - static struct wlr_xwayland_surface *wlr_xwayland_surface_create( struct wlr_xwm *xwm, xcb_window_t window_id, int16_t x, int16_t y, uint16_t width, uint16_t height, bool override_redirect) { @@ -707,6 +696,8 @@ static void handle_compositor_surface_create(struct wl_listener *listener, void wl_list_for_each(xwayland_surface, &xwm->unpaired_surfaces, unpaired_link) { if (xwayland_surface->surface_id == surface_id) { map_shell_surface(xwm, xwayland_surface, surface); + xwayland_surface->surface_id = 0; + wl_list_remove(&xwayland_surface->unpaired_link); xcb_flush(xwm->xcb_conn); return; } |