[libadwaita] app-window: Don't notify when setting same content
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita] app-window: Don't notify when setting same content
- Date: Thu, 14 Jul 2022 15:17:46 +0000 (UTC)
commit 7a01e6679e3b06b5925a5759965fabc43bedd074
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Thu Jul 14 09:43:47 2022 +0200
app-window: Don't notify when setting same content
src/adw-application-window.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/adw-application-window.c b/src/adw-application-window.c
index 88d97aec..72e2b599 100644
--- a/src/adw-application-window.c
+++ b/src/adw-application-window.c
@@ -204,6 +204,9 @@ adw_application_window_set_content (AdwApplicationWindow *self,
g_return_if_fail (ADW_IS_APPLICATION_WINDOW (self));
g_return_if_fail (content == NULL || GTK_IS_WIDGET (content));
+ if (adw_application_window_get_content (self) == content)
+ return;
+
adw_window_mixin_set_content (ADW_GET_WINDOW_MIXIN (self), content);
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_CONTENT]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]