[gnome-todo/wip/cdavis/fix-errors: 2/2] gui: Fix errors from GTK4 resizing changes




commit a7dae621e085c8d8b2711998ed845fdd7b4328e4
Author: Christopher Davis <brainblasted disroot org>
Date:   Mon Dec 21 00:03:00 2020 -0800

    gui: Fix errors from GTK4 resizing changes
    
    Shortly before release some changes to GTK4's window
    sizing code landed. These changes broke API and To Do's
    build. This commit fixes the build issues caused by those changes.

 src/gui/gtd-menu-button.c | 2 +-
 src/gui/gtd-window.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/gtd-menu-button.c b/src/gui/gtd-menu-button.c
index 7a4c759..d53f206 100644
--- a/src/gui/gtd-menu-button.c
+++ b/src/gui/gtd-menu-button.c
@@ -244,7 +244,7 @@ gtd_menu_button_size_allocate (GtkWidget *widget,
                             &(GtkAllocation) { 0, 0, width, height },
                             baseline);
   if (priv->popover)
-    gtk_native_check_resize (GTK_NATIVE (priv->popover));
+    gtk_popover_present (GTK_POPOVER (priv->popover));
 }
 
 static gboolean
diff --git a/src/gui/gtd-window.c b/src/gui/gtd-window.c
index 2f45c9b..21f741a 100644
--- a/src/gui/gtd-window.c
+++ b/src/gui/gtd-window.c
@@ -534,7 +534,7 @@ gtd_window_unmap (GtkWidget *widget)
       gint height;
       gint width;
 
-      gtk_window_get_size (window, &width, &height);
+      gtk_window_get_default_size (window, &width, &height);
       g_settings_set (settings, "window-size", "(ii)", width, height);
     }
 


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