mirror of
https://github.com/labwc/labwc.git
synced 2026-02-07 04:07:42 -05:00
view: factor out view_impl_init_foreign_toplevel()
This commit is contained in:
parent
51c2003ed8
commit
5543affe35
5 changed files with 40 additions and 37 deletions
|
|
@ -7,6 +7,24 @@
|
|||
#include "view.h"
|
||||
#include "window-rules.h"
|
||||
|
||||
void
|
||||
view_impl_init_foreign_toplevel(struct view *view)
|
||||
{
|
||||
if (view->foreign_toplevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
view->foreign_toplevel = foreign_toplevel_create(view);
|
||||
|
||||
if (view->impl->get_parent) {
|
||||
struct view *parent = view->impl->get_parent(view);
|
||||
if (parent && parent->foreign_toplevel) {
|
||||
foreign_toplevel_set_parent(view->foreign_toplevel,
|
||||
parent->foreign_toplevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_impl_map(struct view *view)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue