}
static void
+shell_surface_set_parent(struct shell_surface *shsurf,
+ struct weston_surface *parent)
+{
+ shsurf->parent = parent;
+}
+
+static void
shell_surface_set_output(struct shell_surface *shsurf,
struct weston_output *output)
{
static void
set_toplevel(struct shell_surface *shsurf)
{
+ shell_surface_set_parent(shsurf, NULL);
+
shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
}
set_transient(struct shell_surface *shsurf,
struct weston_surface *parent, int x, int y, uint32_t flags)
{
- /* assign to parents output */
- shsurf->parent = parent;
+ assert(parent != NULL);
+
shsurf->transient.x = x;
shsurf->transient.y = y;
shsurf->transient.flags = flags;
+
+ shell_surface_set_parent(shsurf, parent);
+
shsurf->next_type = SHELL_SURFACE_TRANSIENT;
}
shsurf->fullscreen_output = shsurf->output;
shsurf->fullscreen.type = method;
shsurf->fullscreen.framerate = framerate;
+
+ shell_surface_set_parent(shsurf, NULL);
+
shsurf->next_type = SHELL_SURFACE_FULLSCREEN;
shsurf->client->send_configure(shsurf->surface, 0,
int32_t x,
int32_t y)
{
+ assert(parent != NULL);
+
shsurf->type = SHELL_SURFACE_POPUP;
- shsurf->parent = parent;
shsurf->popup.shseat = get_shell_seat(seat);
shsurf->popup.serial = serial;
shsurf->popup.x = x;
shsurf->popup.y = y;
+
+ shell_surface_set_parent(shsurf, parent);
}
static void
shsurf->output->width,
shsurf->output->height - panel_height);
+ shell_surface_set_parent(shsurf, NULL);
+
shsurf->next_type = SHELL_SURFACE_MAXIMIZED;
}
shsurf->transient.x = x;
shsurf->transient.y = y;
shsurf->transient.flags = flags;
+
+ shell_surface_set_parent(shsurf, NULL);
+
shsurf->next_type = SHELL_SURFACE_XWAYLAND;
}