[gtk/wip/matthiasc/popup5: 133/186] Drop gtk_widget_set_surface
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 133/186] Drop gtk_widget_set_surface
- Date: Tue, 28 May 2019 20:20:07 +0000 (UTC)
commit c951bc967b769316b72966e7687cf55d8d68b056
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 17 21:34:20 2019 +0000
Drop gtk_widget_set_surface
Not used anymore. Only GtkNative's have surfaces.
docs/reference/gtk/gtk4-sections.txt | 1 -
gtk/gtkpopover.c | 1 -
gtk/gtkwidget.c | 33 ---------------------------------
gtk/gtkwidget.h | 3 ---
gtk/gtkwindow.c | 2 --
5 files changed, 40 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 6935c3eb6f..79e0fc9cef 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4529,7 +4529,6 @@ gtk_widget_has_visible_focus
gtk_widget_has_grab
gtk_widget_is_drawable
gtk_widget_is_toplevel
-gtk_widget_set_surface
gtk_widget_set_receives_default
gtk_widget_get_receives_default
gtk_widget_set_support_multidevice
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 0cd7110191..9b8b219620 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -570,7 +570,6 @@ gtk_popover_realize (GtkWidget *widget)
priv->surface = gdk_surface_new_popup (display, gtk_widget_get_surface (priv->relative_to), priv->modal);
- gtk_widget_set_surface (widget, priv->surface);
gdk_surface_set_widget (priv->surface, widget);
g_signal_connect_swapped (priv->surface, "notify::state", G_CALLBACK (surface_state_changed), widget);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 1b07e852f4..53e466a245 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8196,7 +8196,6 @@ gtk_widget_real_realize (GtkWidget *widget)
if (GTK_IS_NATIVE (widget))
{
- g_assert (priv->surface != NULL);
priv->surface = gtk_native_get_surface (GTK_NATIVE (widget));
g_object_ref (priv->surface);
}
@@ -11199,38 +11198,6 @@ gtk_widget_get_allocated_baseline (GtkWidget *widget)
return priv->baseline - margin.top - border.top - padding.top;
}
-/**
- * gtk_widget_set_surface:
- * @widget: a #GtkWidget
- * @surface: (transfer full): a #GdkSurface
- *
- * Sets a widget’s surface. This function should only be used in a
- * widget’s #GtkWidget::realize implementation. The %surface passed is
- * usually either new surface created with gdk_surface_new(), or the
- * surface of its parent widget as returned by
- * gtk_widget_get_parent_surface().
- *
- * Widgets must indicate whether they will create their own #GdkSurface
- * by calling gtk_widget_set_has_surface(). This is usually done in the
- * widget’s init() function.
- *
- * Note that this function does not add any reference to @surface.
- */
-void
-gtk_widget_set_surface (GtkWidget *widget,
- GdkSurface *surface)
-{
- GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
-
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (surface == NULL || GDK_IS_SURFACE (surface));
-
- if (priv->surface != surface)
- {
- priv->surface = surface;
- }
-}
-
/**
* gtk_widget_get_surface:
* @widget: a #GtkWidget
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 831773e7a0..854ada26ff 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -552,9 +552,6 @@ void gtk_widget_set_child_visible (GtkWidget *widget,
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_get_child_visible (GtkWidget *widget);
-GDK_AVAILABLE_IN_ALL
-void gtk_widget_set_surface (GtkWidget *widget,
- GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
GdkSurface * gtk_widget_get_surface (GtkWidget *widget);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2bc6ed44f5..cef737d647 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5698,8 +5698,6 @@ gtk_window_realize (GtkWidget *widget)
}
priv->surface = surface;
-
- gtk_widget_set_surface (widget, surface);
gdk_surface_set_widget (surface, widget);
g_signal_connect_swapped (surface, "notify::state", G_CALLBACK (surface_state_changed), widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]