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




commit e676ed7b772324a1187d0e15e7ba8b307ae655a3
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      | 3 ++-
 2 files changed, 3 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..02f9130 100644
--- a/src/gui/gtd-window.c
+++ b/src/gui/gtd-window.c
@@ -534,7 +534,8 @@ gtd_window_unmap (GtkWidget *widget)
       gint height;
       gint width;
 
-      gtk_window_get_size (window, &width, &height);
+      height = gtk_widget_get_height (GTK_WIDGET (window));
+      width = gtk_widget_get_width (GTK_WIDGET (window));
       g_settings_set (settings, "window-size", "(ii)", width, height);
     }
 


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