[libgd/wip/ernestask/gtk4: 3/5] notification: use gtk_widget_get_allocated_height()
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd/wip/ernestask/gtk4: 3/5] notification: use gtk_widget_get_allocated_height()
- Date: Sun, 11 Mar 2018 13:36:50 +0000 (UTC)
commit 2c7f4952c6f6d60edeb34b807d6af975c31da7ac
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 150afe1..5a70c3c 100644
--- a/libgd/gd-notification.c
+++ b/libgd/gd-notification.c
@@ -224,11 +224,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]