summaryrefslogtreecommitdiff
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorRyan Dwyer <[email protected]>2018-06-30 14:30:14 +1000
committerRyan Dwyer <[email protected]>2018-06-30 14:30:14 +1000
commit96c8c024830f13a27790d4ea36b640df383a7f49 (patch)
tree1dfb16aaaf34793103d4fcb88ced9c12e4d06505 /sway/desktop/xwayland.c
parent3a6ed5110c76ef5bed8cc4c26a97759f6201eaac (diff)
Fix flash of background when xwayland views are mapped
A flash of background was happening for two reasons: 1) We were using the xsurface's dimensions to check if the surface is ready, but these are pending dimensions. 2) In my particular setup, the default geometry of the xsurface does not intersect any output, which prevented it from receiving a frame done event. This made the transaction time out and the client would only redraw once it's been rendered.
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 023fb2a7..ad893248 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -269,10 +269,11 @@ 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;
if (view->swayc->instructions->length) {
transaction_notify_view_ready_by_size(view,
- xsurface->width, xsurface->height);
+ surface_state->width, surface_state->height);
}
view_damage_from(view);
}