vcl/inc/unx/gtk/gtkframe.hxx |    2 +-
 vcl/unx/gtk3/gtkframe.cxx    |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9837e74c2a4ea95cf38c65c76a81c405f256dda8
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon May 10 11:49:27 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon May 10 15:36:52 2021 +0200

    gtk4: enable partial signalRealize
    
    Change-Id: I17bc5d5c0250aea6852e9e82e3742fece4966b34
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115325
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 9c3753fa003b..7f637510bdf2 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -253,8 +253,8 @@ class GtkSalFrame final : public SalFrame
     static void         signalDraw(GtkDrawingArea*, cairo_t *cr, int width, 
int height, gpointer);
     static void         sizeAllocated(GtkWidget*, int nWidth, int nHeight, 
gpointer frame);
 #endif
-#if !GTK_CHECK_VERSION(4, 0, 0)
     static void         signalRealize(GtkWidget*, gpointer frame);
+#if !GTK_CHECK_VERSION(4, 0, 0)
     static gboolean     signalTooltipQuery(GtkWidget*, gint x, gint y,
                                      gboolean keyboard_mode, GtkTooltip 
*tooltip,
                                      gpointer frame);
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 8e95d4ed1227..46f34dc143f4 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -964,9 +964,9 @@ void GtkSalFrame::InitCommon()
     g_signal_connect( G_OBJECT(m_pFixedContainer), "resize", 
G_CALLBACK(sizeAllocated), this );
 #endif
 
-#if !GTK_CHECK_VERSION(4,0,0)
     g_signal_connect( G_OBJECT(m_pFixedContainer), "realize", 
G_CALLBACK(signalRealize), this );
 
+#if !GTK_CHECK_VERSION(4,0,0)
     GtkGesture *pSwipe = gtk_gesture_swipe_new(pEventWidget);
     g_signal_connect(pSwipe, "swipe", G_CALLBACK(gestureSwipe), this);
     gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER (pSwipe), 
GTK_PHASE_TARGET);
@@ -3295,6 +3295,7 @@ void swapDirection(GdkGravity& gravity)
 }
 
 }
+#endif
 
 void GtkSalFrame::signalRealize(GtkWidget*, gpointer frame)
 {
@@ -3304,6 +3305,7 @@ void GtkSalFrame::signalRealize(GtkWidget*, gpointer 
frame)
         return;
     pThis->TriggerPaintEvent();
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
     if (!pThis->m_bFloatPositioned)
         return;
 
@@ -3346,8 +3348,10 @@ void GtkSalFrame::signalRealize(GtkWidget*, gpointer 
frame)
 
     GdkWindow* gdkWindow = gtk_widget_get_window(pThis->m_pWindow);
     window_move_to_rect(gdkWindow, &rect, rect_anchor, menu_anchor, 
static_cast<GdkAnchorHints>(GDK_ANCHOR_FLIP | GDK_ANCHOR_SLIDE), 0, 0);
+#endif
 }
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 gboolean GtkSalFrame::signalConfigure(GtkWidget*, GdkEventConfigure* pEvent, 
gpointer frame)
 {
     GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to