forked from AuroraMiddleware/gtk
Add gdk_surface_get_parent back
The api is the same, the parent is different. This now returns the parent of popup surfaces.
This commit is contained in:
parent
ebb89bca0d
commit
18e396ef6c
@ -181,6 +181,7 @@ GdkSurfaceState
|
|||||||
gdk_surface_new_toplevel
|
gdk_surface_new_toplevel
|
||||||
gdk_surface_new_temp
|
gdk_surface_new_temp
|
||||||
gdk_surface_new_popup
|
gdk_surface_new_popup
|
||||||
|
gdk_surface_get_parent
|
||||||
gdk_surface_destroy
|
gdk_surface_destroy
|
||||||
gdk_surface_get_surface_type
|
gdk_surface_get_surface_type
|
||||||
gdk_surface_get_display
|
gdk_surface_get_display
|
||||||
|
@ -800,6 +800,26 @@ gdk_surface_new_popup (GdkDisplay *display,
|
|||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_surface_get_parent:
|
||||||
|
* @surface: a #GtkSurface
|
||||||
|
*
|
||||||
|
* Returns the parent surface of a surface, or
|
||||||
|
* %NULL if the surface does not have a parent.
|
||||||
|
*
|
||||||
|
* Only popup surfaces have parents.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none) (nullable): the parent of
|
||||||
|
* @surface, or %NULL
|
||||||
|
*/
|
||||||
|
GdkSurface *
|
||||||
|
gdk_surface_get_parent (GdkSurface *surface)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
|
||||||
|
|
||||||
|
return surface->parent;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_pointer_info_foreach (GdkDisplay *display,
|
update_pointer_info_foreach (GdkDisplay *display,
|
||||||
GdkDevice *device,
|
GdkDevice *device,
|
||||||
|
@ -436,6 +436,9 @@ GdkSurfaceType gdk_surface_get_surface_type (GdkSurface *surface);
|
|||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gdk_surface_is_destroyed (GdkSurface *surface);
|
gboolean gdk_surface_is_destroyed (GdkSurface *surface);
|
||||||
|
|
||||||
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
GdkSurface * gdk_surface_get_parent (GdkSurface *surface);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GdkDisplay * gdk_surface_get_display (GdkSurface *surface);
|
GdkDisplay * gdk_surface_get_display (GdkSurface *surface);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
Loading…
Reference in New Issue
Block a user