[gtk/wip/matthiasc/popup5: 41/186] widget: Use GtkNative
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 41/186] widget: Use GtkNative
- Date: Tue, 28 May 2019 20:12:24 +0000 (UTC)
commit ab386bd425c7c0f563727fbfc2797a1c25da8198
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 29 13:47:40 2019 -0400
widget: Use GtkNative
gtk/gtkwidget.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b8c8d38032..b771d25b51 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -56,6 +56,8 @@
#include "gtkprivate.h"
#include "gtkrenderbackgroundprivate.h"
#include "gtkrenderborderprivate.h"
+#include "gtkrootprivate.h"
+#include "gtknativeprivate.h"
#include "gtkscrollable.h"
#include "gtkselection.h"
#include "gtksettingsprivate.h"
@@ -3635,7 +3637,7 @@ sync_widget_surface_transform (GtkWidget *widget)
was_valid = surface_transform_data->cached_surface_transform_valid;
prev_transform = surface_transform_data->cached_surface_transform;
- if (GTK_IS_ROOT (widget))
+ if (GTK_IS_NATIVE (widget))
{
gsk_transform_to_matrix (priv->transform,
&surface_transform_data->cached_surface_transform);
@@ -3645,11 +3647,6 @@ sync_widget_surface_transform (GtkWidget *widget)
{
surface_transform_data->cached_surface_transform_valid = FALSE;
}
- else if (gtk_widget_compute_transform (widget, GTK_WIDGET (priv->root),
- &surface_transform_data->cached_surface_transform))
- {
- surface_transform_data->cached_surface_transform_valid = TRUE;
- }
else
{
GtkWidget *native = GTK_WIDGET (gtk_widget_get_native (widget));
@@ -11443,7 +11440,7 @@ gtk_widget_unregister_surface (GtkWidget *widget,
*
* Returns: (transfer none) (nullable): @widget’s surface.
*/
-GdkSurface*
+GdkSurface *
gtk_widget_get_surface (GtkWidget *widget)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
@@ -13464,7 +13461,7 @@ gtk_widget_set_cursor (GtkWidget *widget,
root = _gtk_widget_get_root (widget);
if (root)
- gtk_root_maybe_update_cursor (root, widget, NULL);
+ gtk_window_maybe_update_cursor (GTK_WINDOW (root), widget, NULL);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_CURSOR]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]