Don't call view_set_fullscreen on unmapped xwayland views

This commit is contained in:
emersion 2018-04-28 20:44:42 +01:00
parent 85ec700206
commit 3fd8897abe
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 8 additions and 5 deletions

View file

@ -280,6 +280,9 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data)
wl_container_of(listener, xwayland_view, request_fullscreen);
struct sway_view *view = &xwayland_view->view;
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
if (!xsurface->mapped) {
return;
}
view_set_fullscreen(view, xsurface->fullscreen);
}
@ -309,7 +312,6 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
// TODO:
// - Look up pid and open on appropriate workspace
// - Criteria
wl_signal_add(&xsurface->events.destroy, &xwayland_view->destroy);
xwayland_view->destroy.notify = handle_destroy;