static void
set_toplevel(struct shell_surface *shsurf)
{
- shell_surface_set_parent(shsurf, NULL);
-
shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
/* The layer_link is updated in set_surface_type(),
{
struct shell_surface *surface = wl_resource_get_user_data(resource);
+ shell_surface_set_parent(surface, NULL);
+
surface_clear_next_states(surface);
set_toplevel(surface);
}
shsurf->transient.y = y;
shsurf->transient.flags = flags;
- shell_surface_set_parent(shsurf, parent);
-
shsurf->next_state.relative = true;
/* The layer_link is updated in set_surface_type(),
struct weston_surface *parent =
wl_resource_get_user_data(parent_resource);
+ shell_surface_set_parent(shsurf, parent);
+
surface_clear_next_states(shsurf);
set_transient(shsurf, parent, x, y, flags);
}
shsurf->fullscreen.type = method;
shsurf->fullscreen.framerate = framerate;
- shell_surface_set_parent(shsurf, NULL);
-
shsurf->next_type = shsurf->type;
shsurf->client->send_configure(shsurf->surface, 0,
else
output = NULL;
+ shell_surface_set_parent(shsurf, NULL);
+
surface_clear_next_states(shsurf);
shsurf->next_state.fullscreen = true;
shsurf->state_changed = true;
shsurf->popup.x = x;
shsurf->popup.y = y;
- shell_surface_set_parent(shsurf, parent);
-
shsurf->next_type = SHELL_SURFACE_POPUP;
}
int32_t x, int32_t y, uint32_t flags)
{
struct shell_surface *shsurf = wl_resource_get_user_data(resource);
+ struct weston_surface *parent =
+ wl_resource_get_user_data(parent_resource);
+
+ shell_surface_set_parent(shsurf, parent);
surface_clear_next_states(shsurf);
set_popup(shsurf,
- wl_resource_get_user_data(parent_resource),
+ parent,
wl_resource_get_user_data(seat_resource),
serial, x, y);
}
shsurf->output->width,
shsurf->output->height - panel_height);
- shell_surface_set_parent(shsurf, NULL);
-
shsurf->next_type = shsurf->type;
}
else
output = NULL;
+ shell_surface_set_parent(shsurf, NULL);
+
surface_clear_next_states(shsurf);
shsurf->next_state.maximized = true;
shsurf->state_changed = true;