aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-26 21:33:18 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commit5b1601c2e32b43cbb253fcd396ab9096f51b7e6c (patch)
tree39d4462eaba6be458a7ea2277a5cad79c3acb553
parent02d385e06f9ca6baccc9fdb35d4ab10532b6c22c (diff)
Don't let xwayland views set position unless unmanaged
-rw-r--r--include/sway/tree/view.h1
-rw-r--r--sway/desktop/xwayland.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 65a23902..5c2f759c 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -137,6 +137,7 @@ struct sway_xwayland_view {
struct wl_listener unmap;
struct wl_listener destroy;
+ int pending_lx, pending_ly;
int pending_width, pending_height;
};
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index fc488162..f3264ddc 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -160,6 +160,8 @@ static void configure(struct sway_view *view, double lx, double ly, int width,
}
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
+ xwayland_view->pending_lx = lx;
+ xwayland_view->pending_ly = ly;
xwayland_view->pending_width = width;
xwayland_view->pending_height = height;
wlr_xwayland_surface_configure(xsurface, lx, ly, width, height);
@@ -264,7 +266,8 @@ static void handle_commit(struct wl_listener *listener, void *data) {
}
if (view->swayc && container_is_floating(view->swayc)) {
view_update_size(view, xsurface->width, xsurface->height);
- view_update_position(view, xsurface->x, xsurface->y);
+ view_update_position(view,
+ xwayland_view->pending_lx, xwayland_view->pending_ly);
} else {
view_update_size(view, xwayland_view->pending_width,
xwayland_view->pending_height);