forked from AuroraMiddleware/gtk
Merge branch 'wip/otte/for-master' into 'master'
surface: Don't take a display argument in gdk_surface_new_popup() See merge request GNOME/gtk!1456
This commit is contained in:
commit
112bc964cb
@ -778,7 +778,6 @@ gdk_surface_new_temp (GdkDisplay *display,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_surface_new_popup: (constructor)
|
* gdk_surface_new_popup: (constructor)
|
||||||
* @display: the display to create the surface on
|
|
||||||
* @parent: the parent surface to attach the surface to
|
* @parent: the parent surface to attach the surface to
|
||||||
* @autohide: whether to hide the surface on outside clicks
|
* @autohide: whether to hide the surface on outside clicks
|
||||||
*
|
*
|
||||||
@ -790,16 +789,14 @@ gdk_surface_new_temp (GdkDisplay *display,
|
|||||||
* Returns: (transfer full): a new #GdkSurface
|
* Returns: (transfer full): a new #GdkSurface
|
||||||
*/
|
*/
|
||||||
GdkSurface *
|
GdkSurface *
|
||||||
gdk_surface_new_popup (GdkDisplay *display,
|
gdk_surface_new_popup (GdkSurface *parent,
|
||||||
GdkSurface *parent,
|
|
||||||
gboolean autohide)
|
gboolean autohide)
|
||||||
{
|
{
|
||||||
GdkSurface *surface;
|
GdkSurface *surface;
|
||||||
|
|
||||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
|
||||||
g_return_val_if_fail (GDK_IS_SURFACE (parent), NULL);
|
g_return_val_if_fail (GDK_IS_SURFACE (parent), NULL);
|
||||||
|
|
||||||
surface = gdk_surface_new (display, GDK_SURFACE_POPUP,
|
surface = gdk_surface_new (parent->display, GDK_SURFACE_POPUP,
|
||||||
parent, 0, 0, 100, 100);
|
parent, 0, 0, 100, 100);
|
||||||
|
|
||||||
surface->autohide = autohide;
|
surface->autohide = autohide;
|
||||||
|
@ -340,8 +340,7 @@ GdkSurface * gdk_surface_new_toplevel (GdkDisplay *display,
|
|||||||
int width,
|
int width,
|
||||||
int height);
|
int height);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GdkSurface * gdk_surface_new_popup (GdkDisplay *display,
|
GdkSurface * gdk_surface_new_popup (GdkSurface *parent,
|
||||||
GdkSurface *parent,
|
|
||||||
gboolean autohide);
|
gboolean autohide);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
@ -743,13 +743,10 @@ gtk_popover_realize (GtkWidget *widget)
|
|||||||
{
|
{
|
||||||
GtkPopover *popover = GTK_POPOVER (widget);
|
GtkPopover *popover = GTK_POPOVER (widget);
|
||||||
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
|
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
|
||||||
GdkDisplay *display;
|
|
||||||
GdkSurface *parent;
|
GdkSurface *parent;
|
||||||
|
|
||||||
display = gtk_widget_get_display (priv->relative_to);
|
|
||||||
|
|
||||||
parent = gtk_native_get_surface (gtk_widget_get_native (priv->relative_to));
|
parent = gtk_native_get_surface (gtk_widget_get_native (priv->relative_to));
|
||||||
priv->surface = gdk_surface_new_popup (display, parent, priv->autohide);
|
priv->surface = gdk_surface_new_popup (parent, priv->autohide);
|
||||||
|
|
||||||
gdk_surface_set_widget (priv->surface, widget);
|
gdk_surface_set_widget (priv->surface, widget);
|
||||||
|
|
||||||
|
@ -229,13 +229,10 @@ static void
|
|||||||
gtk_tooltip_window_realize (GtkWidget *widget)
|
gtk_tooltip_window_realize (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GtkTooltipWindow *window = GTK_TOOLTIP_WINDOW (widget);
|
GtkTooltipWindow *window = GTK_TOOLTIP_WINDOW (widget);
|
||||||
GdkDisplay *display;
|
|
||||||
GdkSurface *parent;
|
GdkSurface *parent;
|
||||||
|
|
||||||
display = gtk_widget_get_display (window->relative_to);
|
|
||||||
|
|
||||||
parent = gtk_native_get_surface (gtk_widget_get_native (window->relative_to));
|
parent = gtk_native_get_surface (gtk_widget_get_native (window->relative_to));
|
||||||
window->surface = gdk_surface_new_popup (display, parent, FALSE);
|
window->surface = gdk_surface_new_popup (parent, FALSE);
|
||||||
|
|
||||||
gdk_surface_set_widget (window->surface, widget);
|
gdk_surface_set_widget (window->surface, widget);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user