foreign: handle output error gracefully

This commit is contained in:
Johan Malm 2021-08-22 19:14:15 +01:00
parent 289c784d5e
commit 5563cd1b20

View file

@ -30,8 +30,14 @@ foreign_toplevel_handle_create(struct view *view)
}
view_update_title(view);
struct wlr_output *wlr_output = view_wlr_output(view);
if (!wlr_output) {
wlr_log(WLR_ERROR, "no wlr_output for (%s)",
view->impl->get_string_prop(view, "title"));
return;
}
wlr_foreign_toplevel_handle_v1_output_enter(view->toplevel_handle,
view_wlr_output(view));
wlr_output);
view->toplevel_handle_request_maximize.notify =
handle_toplevel_handle_request_maximize;