aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/xwayland.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index dca62fb1..b5df907d 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -282,11 +282,19 @@ static void handle_commit(struct wl_listener *listener, void *data) {
wl_container_of(listener, xwayland_view, commit);
struct sway_view *view = &xwayland_view->view;
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
- struct wlr_surface_state *surface_state = &xsurface->surface->current;
+ struct wlr_surface_state *state = &xsurface->surface->current;
if (view->swayc->instruction) {
transaction_notify_view_ready_by_size(view,
- surface_state->width, surface_state->height);
+ state->width, state->height);
+ } else if ((state->width != view->width || state->height != view->height) &&
+ container_is_floating(view->swayc)) {
+ // eg. The Firefox "Save As" dialog when downloading a file
+ // It maps at a small size then changes afterwards.
+ view->width = state->width;
+ view->height = state->height;
+ container_set_geometry_from_floating_view(view->swayc);
+ transaction_commit_dirty();
}
view_damage_from(view);