Handle repositioning of xwayland views

This commit is contained in:
project-repo 2020-08-31 11:41:45 +02:00
commit 3e2f90fa1e

View file

@ -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