mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
wayland-surface: Send out an error for a popup with an invalid parent
Instead of silently failing without the client noticing. https://bugzilla.gnome.org/show_bug.cgi?id=753237
This commit is contained in:
parent
ab9dabe725
commit
9c745105f8
@ -1365,9 +1365,6 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
|||||||
MetaDisplay *display = meta_get_display ();
|
MetaDisplay *display = meta_get_display ();
|
||||||
MetaWaylandPopup *popup;
|
MetaWaylandPopup *popup;
|
||||||
|
|
||||||
if (parent_surf == NULL || parent_surf->window == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (surface->xdg_popup != NULL)
|
if (surface->xdg_popup != NULL)
|
||||||
{
|
{
|
||||||
wl_resource_post_error (surface_resource,
|
wl_resource_post_error (surface_resource,
|
||||||
@ -1382,7 +1379,9 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
|||||||
XDG_SHELL_ERROR_ROLE) != 0)
|
XDG_SHELL_ERROR_ROLE) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (parent_surf->xdg_popup == NULL && parent_surf->xdg_surface == NULL)
|
if (parent_surf == NULL ||
|
||||||
|
parent_surf->window == NULL ||
|
||||||
|
(parent_surf->xdg_popup == NULL && parent_surf->xdg_surface == NULL))
|
||||||
{
|
{
|
||||||
wl_resource_post_error (resource,
|
wl_resource_post_error (resource,
|
||||||
XDG_POPUP_ERROR_INVALID_PARENT,
|
XDG_POPUP_ERROR_INVALID_PARENT,
|
||||||
|
Loading…
Reference in New Issue
Block a user