[gtk] magnifier: Use gtk_widget_set_overflow()



commit 3517eb7c545df0136590397c0d2b292798832c75
Author: Benjamin Otte <otte redhat com>
Date:   Fri Feb 8 18:16:07 2019 +0100

    magnifier: Use gtk_widget_set_overflow()

 gtk/gtkmagnifier.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkmagnifier.c b/gtk/gtkmagnifier.c
index fce0f0399b..0ddbdd882c 100644
--- a/gtk/gtkmagnifier.c
+++ b/gtk/gtkmagnifier.c
@@ -116,9 +116,6 @@ gtk_magnifier_snapshot (GtkWidget   *widget,
   if (paintable_width <= 0.0 || paintable_height <= 0.0)
     return;
 
-  gtk_snapshot_push_clip (snapshot,
-                          &GRAPHENE_RECT_INIT (0, 0, width, height));
-
   graphene_matrix_init_translate (&transform, &GRAPHENE_POINT3D_INIT (
                                  - CLAMP (priv->x, 0, paintable_width),
                                  - CLAMP (priv->y, 0, paintable_height),
@@ -132,8 +129,6 @@ gtk_magnifier_snapshot (GtkWidget   *widget,
   gtk_snapshot_push_transform (snapshot, &transform);
   gdk_paintable_snapshot (priv->paintable, snapshot, paintable_width, paintable_height);
   gtk_snapshot_pop (snapshot);
-
-  gtk_snapshot_pop (snapshot);
 }
 
 static void
@@ -218,6 +213,8 @@ gtk_magnifier_init (GtkMagnifier *self)
   GtkWidget *widget = GTK_WIDGET (self);
 
   gtk_widget_set_has_surface (widget, FALSE);
+  gtk_widget_set_overflow (widget, GTK_OVERFLOW_HIDDEN);
+
   priv->magnification = 1;
   priv->resize = FALSE;
   priv->paintable = gtk_widget_paintable_new (NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]