diff --git a/xwayland.c b/xwayland.c index 0fece9a..774bb4e 100644 --- a/xwayland.c +++ b/xwayland.c @@ -150,7 +150,15 @@ handle_xwayland_surface_commit(struct wl_listener *listener, void *_data) { struct cg_xwayland_view *xwayland_view = wl_container_of(listener, xwayland_view, commit); struct cg_view *view = &xwayland_view->view; - view_damage_part(view); + /* xwayland surface has moved */ + if(xwayland_view->xwayland_surface->x != view->ox || xwayland_view->xwayland_surface->y != view->oy) { + output_damage_surface(view->workspace->output, view->wlr_surface,view->ox,view->oy,true); + view->ox=xwayland_view->xwayland_surface->x; + view->oy=xwayland_view->xwayland_surface->y; + output_damage_surface(view->workspace->output, view->wlr_surface,view->ox,view->oy,true); + } else { + view_damage_part(view); + } } static void