wayland: Fix compile error

I tested this with meta_window_get_input_rect and decided to change
it at the last minute. Turns out meta_window_get_rect is unlike all
the others. Just access window->rect directly instead.
This commit is contained in:
Jasper St. Pierre 2014-02-18 19:01:50 -05:00
parent 47f4c9db7b
commit cc13f8f65e

View File

@ -1015,13 +1015,10 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource); MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource);
MetaWaylandSurface *parent_surf = wl_resource_get_user_data (parent_resource); MetaWaylandSurface *parent_surf = wl_resource_get_user_data (parent_resource);
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource); MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
MetaRectangle parent_rect;
if (parent_surf == NULL || parent_surf->window == NULL) if (parent_surf == NULL || parent_surf->window == NULL)
return; return;
meta_window_get_rect (parent_surf->window, &parent_rect);
if (!create_surface_extension (&surface->xdg_popup, client, surface_resource, resource, id, if (!create_surface_extension (&surface->xdg_popup, client, surface_resource, resource, id,
META_XDG_POPUP_VERSION, META_XDG_POPUP_VERSION,
&xdg_popup_interface, &xdg_popup_interface,
@ -1035,8 +1032,8 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
} }
surface->window = meta_window_wayland_new (meta_get_display (), surface); surface->window = meta_window_wayland_new (meta_get_display (), surface);
surface->window->rect.x = parent_rect.x + x; surface->window->rect.x = parent_surf->window->rect.x + x;
surface->window->rect.y = parent_rect.y + y; surface->window->rect.y = parent_surf->window->rect.y + y;
surface->window->showing_for_first_time = FALSE; surface->window->showing_for_first_time = FALSE;
surface->window->placed = TRUE; surface->window->placed = TRUE;
meta_window_set_transient_for (surface->window, parent_surf->window); meta_window_set_transient_for (surface->window, parent_surf->window);