Handle unmanaged surfaces motion

This commit is contained in:
emersion 2018-04-05 18:48:35 -04:00
parent d65d001aa5
commit 641807d920
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 31 additions and 20 deletions

View file

@ -48,17 +48,13 @@ static struct sway_container *container_at_cursor(struct sway_cursor *cursor,
struct wlr_surface **surface, double *sx, double *sy) {
// check for unmanaged views first
struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged;
struct sway_xwayland_unmanaged *sway_surface;
wl_list_for_each_reverse(sway_surface, unmanaged, link) {
struct sway_xwayland_unmanaged *unmanaged_surface;
wl_list_for_each_reverse(unmanaged_surface, unmanaged, link) {
struct wlr_xwayland_surface *xsurface =
sway_surface->wlr_xwayland_surface;
if (xsurface->surface == NULL) {
continue;
}
unmanaged_surface->wlr_xwayland_surface;
struct wlr_box box = {
.x = xsurface->x,
.y = xsurface->y,
.x = unmanaged_surface->lx,
.y = unmanaged_surface->ly,
.width = xsurface->width,
.height = xsurface->height,
};