Add simple foreign toplevel implementation

This commit is contained in:
Johan Malm 2021-08-05 12:18:10 +01:00
parent 7dc4ae36ca
commit 042ea266a5
7 changed files with 91 additions and 2 deletions

View file

@ -36,7 +36,7 @@ view_unminimize(struct view *view)
}
/* view_wlr_output - return the output that a view is mostly on */
static struct wlr_output *
struct wlr_output *
view_wlr_output(struct view *view)
{
return wlr_output_layout_output_at(view->server->output_layout,
@ -163,3 +163,13 @@ view_move_to_edge(struct view *view, const char *direction)
}
view_move(view, x, y);
}
void
view_update_title(struct view *view)
{
const char *title = view->impl->get_string_prop(view, "title");
if (!view->toplevel_handle || !title) {
return;
}
wlr_foreign_toplevel_handle_v1_set_title(view->toplevel_handle, title);
}