[libgd/wip/ernestask/gtk4: 15/17] notification: use gtk_widget_get_allocated_height()



commit 637d1d1dff025e8f48af232277d1a3fc45924e09
Author: Ernestas Kulik <ernestask gnome org>
Date:   Sun Mar 11 10:11:41 2018 +0200

    notification: use gtk_widget_get_allocated_height()
    
    Using gtk_widget_get_allocation() only for the height seems wasteful.

 libgd/gd-notification.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/libgd/gd-notification.c b/libgd/gd-notification.c
index 513792e..26c48ad 100644
--- a/libgd/gd-notification.c
+++ b/libgd/gd-notification.c
@@ -241,11 +241,9 @@ static int
 animation_target (GdNotification *notification)
 {
   GdNotificationPrivate *priv = notification->priv;
-  GtkAllocation allocation;
 
   if (priv->revealed) {
-    gtk_widget_get_allocation (GTK_WIDGET (notification), &allocation);
-    return allocation.height;
+    return gtk_widget_get_allocated_height (GTK_WIDGET (notification));
   } else {
     return 0;
   }


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