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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 11 15:39:23 UTC 2021


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

New commits:
commit 8fb62def894ce6ea37ade9fc20e3cdad5562d0aa
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 11 15:18:23 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 11 17:38:30 2021 +0200

    gtk4: drop unneeded ifdef
    
    Change-Id: I6bc4c95b1eebaec6362ce852a76ae8d947b81199
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115431
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 45df011039ef..ba5478c8249a 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -2142,7 +2142,7 @@ void GtkSalFrame::updateWMClass()
     if (!getDisplay()->IsX11Display())
         return;
 
-    display = GDK_DISPLAY_XDISPLAY(getGdkDisplay());
+    display = gdk_x11_display_get_xdisplay(getGdkDisplay());
 
     if( gtk_widget_get_realized( m_pWindow ) )
     {
@@ -2194,17 +2194,17 @@ void GtkSalFrame::StartPresentation( bool bStart )
 {
     std::optional<guint> aWindow;
     std::optional<Display*> aDisplay;
-#if !GTK_CHECK_VERSION(4, 0, 0)
-    if( getDisplay()->IsX11Display() )
+
+    bool bX11 = getDisplay()->IsX11Display();
+    if (bX11)
     {
         aWindow = GtkSalFrame::GetNativeWindowHandle(m_pWindow);
-        aDisplay = GDK_DISPLAY_XDISPLAY( getGdkDisplay() );
+        aDisplay = gdk_x11_display_get_xdisplay(getGdkDisplay());
     }
-#endif
 
     m_ScreenSaverInhibitor.inhibit( bStart,
                                     u"presentation",
-                                    getDisplay()->IsX11Display(),
+                                    bX11,
                                     aWindow,
                                     aDisplay );
 }


More information about the Libreoffice-commits mailing list