From fef4e02b50a366aa4a0a13fc8f9c606a47f9745f Mon Sep 17 00:00:00 2001
From: Anton Lazarev <antonok35@gmail.com>
Date: Wed, 13 Dec 2023 17:09:55 -0800
Subject: [PATCH] calls-main-window: Adapt to GTKWidget's size allocation
 changes

https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkwidgets-size-allocation-changes

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
---
 src/calls-main-window.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/calls-main-window.c b/src/calls-main-window.c
index b47b976..045a724 100644
--- a/src/calls-main-window.c
+++ b/src/calls-main-window.c
@@ -420,14 +420,16 @@ dispose (GObject *object)
 
 static void
 size_allocate (GtkWidget     *widget,
-               GtkAllocation *allocation)
+               int            width,
+               int            height,
+               int            baseline)
 {
   CallsMainWindow *self = CALLS_MAIN_WINDOW (widget);
 
   adw_view_switcher_title_set_view_switcher_enabled (self->title_switcher,
-                                                     allocation->width > 400);
+                                                     width > 400);
 
-  GTK_WIDGET_CLASS (calls_main_window_parent_class)->size_allocate (widget, allocation);
+  GTK_WIDGET_CLASS (calls_main_window_parent_class)->size_allocate (widget, width, height, baseline);
 }