diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-26 21:33:18 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-01 23:14:58 +1000 |
commit | 5b1601c2e32b43cbb253fcd396ab9096f51b7e6c (patch) | |
tree | 39d4462eaba6be458a7ea2277a5cad79c3acb553 | |
parent | Use swayc rather than wlr_output when rendering (diff) | |
download | sway-5b1601c2e32b43cbb253fcd396ab9096f51b7e6c.tar.gz sway-5b1601c2e32b43cbb253fcd396ab9096f51b7e6c.tar.zst sway-5b1601c2e32b43cbb253fcd396ab9096f51b7e6c.zip |
Don't let xwayland views set position unless unmanaged
-rw-r--r-- | include/sway/tree/view.h | 1 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 5 |
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 { | |||
137 | struct wl_listener unmap; | 137 | struct wl_listener unmap; |
138 | struct wl_listener destroy; | 138 | struct wl_listener destroy; |
139 | 139 | ||
140 | int pending_lx, pending_ly; | ||
140 | int pending_width, pending_height; | 141 | int pending_width, pending_height; |
141 | }; | 142 | }; |
142 | 143 | ||
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, | |||
160 | } | 160 | } |
161 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | 161 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; |
162 | 162 | ||
163 | xwayland_view->pending_lx = lx; | ||
164 | xwayland_view->pending_ly = ly; | ||
163 | xwayland_view->pending_width = width; | 165 | xwayland_view->pending_width = width; |
164 | xwayland_view->pending_height = height; | 166 | xwayland_view->pending_height = height; |
165 | wlr_xwayland_surface_configure(xsurface, lx, ly, width, height); | 167 | wlr_xwayland_surface_configure(xsurface, lx, ly, width, height); |
@@ -264,7 +266,8 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
264 | } | 266 | } |
265 | if (view->swayc && container_is_floating(view->swayc)) { | 267 | if (view->swayc && container_is_floating(view->swayc)) { |
266 | view_update_size(view, xsurface->width, xsurface->height); | 268 | view_update_size(view, xsurface->width, xsurface->height); |
267 | view_update_position(view, xsurface->x, xsurface->y); | 269 | view_update_position(view, |
270 | xwayland_view->pending_lx, xwayland_view->pending_ly); | ||
268 | } else { | 271 | } else { |
269 | view_update_size(view, xwayland_view->pending_width, | 272 | view_update_size(view, xwayland_view->pending_width, |
270 | xwayland_view->pending_height); | 273 | xwayland_view->pending_height); |