if (display->shell)
wl_shell_surface_set_transient(window->shell_surface,
- window->parent->shell_surface,
+ window->parent->surface,
window->x, window->y, flags);
return window;
input_ungrab(input);
wl_shell_surface_set_popup(window->shell_surface, input->seat,
display_get_serial(window->display),
- window->parent->shell_surface,
+ window->parent->surface,
window->x, window->y, 0);
widget_set_redraw_handler(menu->widget, menu_redraw_handler);
void (*set_toplevel)(struct shell_surface *shsurf);
void (*set_transient)(struct shell_surface *shsurf,
- struct shell_surface *pshsurf,
+ struct weston_surface *parent,
int x, int y, uint32_t flags);
int (*move)(struct shell_surface *shsurf, struct weston_seat *ws);
int (*resize)(struct shell_surface *shsurf,
struct weston_surface *surface;
struct wl_listener surface_destroy_listener;
- struct shell_surface *parent;
+ struct weston_surface *parent;
struct desktop_shell *shell;
enum shell_surface_type type, next_type;
set_surface_type(struct shell_surface *shsurf)
{
struct weston_surface *surface = shsurf->surface;
- struct shell_surface *pshsurf = shsurf->parent;
- struct weston_surface *pes;
+ struct weston_surface *pes = shsurf->parent;
reset_shell_surface_type(shsurf);
case SHELL_SURFACE_TOPLEVEL:
break;
case SHELL_SURFACE_TRANSIENT:
- pes = pshsurf->surface;
weston_surface_set_position(surface,
pes->geometry.x + shsurf->transient.x,
pes->geometry.y + shsurf->transient.y);
static void
set_transient(struct shell_surface *shsurf,
- struct shell_surface *pshsurf, int x, int y, uint32_t flags)
+ struct weston_surface *parent, int x, int y, uint32_t flags)
{
/* assign to parents output */
- shsurf->parent = pshsurf;
+ shsurf->parent = parent;
shsurf->transient.x = x;
shsurf->transient.y = y;
shsurf->transient.flags = flags;
int x, int y, uint32_t flags)
{
struct shell_surface *shsurf = resource->data;
- struct shell_surface *pshsurf = parent_resource->data;
+ struct weston_surface *parent = parent_resource->data;
- set_transient(shsurf, pshsurf, x, y, flags);
+ set_transient(shsurf, parent, x, y, flags);
}
static struct desktop_shell *
{
struct wl_seat *seat = shsurf->popup.seat;
struct weston_surface *es = shsurf->surface;
- struct weston_surface *parent = shsurf->parent->surface;
+ struct weston_surface *parent = shsurf->parent;
es->output = parent->output;
shsurf->popup.grab.interface = &popup_grab_interface;
switch (surface_type) {
case SHELL_SURFACE_POPUP:
case SHELL_SURFACE_TRANSIENT:
- parent = shsurf->parent->surface;
+ parent = shsurf->parent;
wl_list_insert(parent->layer_link.prev, &surface->layer_link);
break;
case SHELL_SURFACE_FULLSCREEN: