[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 1 10:21:15 UTC 2021


 vcl/unx/gtk3/gtkinst.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b05090e9d8765e964d939ee5cdd743fc7f463acd
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 1 09:33:27 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 1 12:20:29 2021 +0200

    gtk4: try gtk_window_get_default_size as replacement
    
    Change-Id: I24585f19037910d868e9dcc19440cee4a3375761
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116520
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b6b5a3ff2a75..02f727c80014 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -5317,13 +5317,13 @@ public:
 
     virtual Size get_size() const override
     {
-#if !GTK_CHECK_VERSION(4, 0, 0)
         int current_width, current_height;
+#if !GTK_CHECK_VERSION(4, 0, 0)
         gtk_window_get_size(m_pWindow, &current_width, &current_height);
-        return Size(current_width, current_height);
 #else
-        return Size(0, 0);
+        gtk_window_get_default_size(m_pWindow, &current_width, &current_height);
 #endif
+        return Size(current_width, current_height);
     }
 
     virtual Point get_position() const override


More information about the Libreoffice-commits mailing list