[Libreoffice-commits] core.git: vcl/inc vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 10 13:38:16 UTC 2021
vcl/inc/unx/gtk/gtkframe.hxx | 2 +-
vcl/unx/gtk3/gtkframe.cxx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 2436ed69a9dec1432117e894cba8ed693960f581
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 10 12:09:41 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon May 10 15:37:32 2021 +0200
gtk4: enable signalTooltipQuery
Change-Id: Ida3593b1e6ecc98425342f9059f0dcd65901823c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115327
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index c45925755b3f..793633905716 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -254,10 +254,10 @@ class GtkSalFrame final : public SalFrame
static void sizeAllocated(GtkWidget*, int nWidth, int nHeight, gpointer frame);
#endif
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);
+#if !GTK_CHECK_VERSION(4, 0, 0)
static gboolean signalDragMotion(GtkWidget *widget, GdkDragContext *context, gint x, gint y,
guint time, gpointer frame);
static gboolean signalDragDrop(GtkWidget* widget, GdkDragContext *context, gint x, gint y,
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 1e6384b5615f..6fd2466a0f85 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -921,8 +921,8 @@ void GtkSalFrame::InitCommon()
gtk_grid_attach(m_pTopLevelGrid, GTK_WIDGET(m_pFixedContainer), 0, 0, 1, 1);
#endif
-#if !GTK_CHECK_VERSION(4,0,0)
GtkWidget *pEventWidget = getMouseEventWidget();
+#if !GTK_CHECK_VERSION(4,0,0)
gtk_widget_set_app_paintable(GTK_WIDGET(m_pFixedContainer), true);
gtk_widget_set_redraw_on_allocate(GTK_WIDGET(m_pFixedContainer), false);
#endif
@@ -931,8 +931,10 @@ void GtkSalFrame::InitCommon()
// connect signals
// use pEventWidget instead of m_pWindow to avoid infinite event loop under Linux Mint Mate 18.3
g_signal_connect( G_OBJECT(pEventWidget), "style-updated", G_CALLBACK(signalStyleUpdated), this );
+#endif
gtk_widget_set_has_tooltip(pEventWidget, true);
m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "query-tooltip", G_CALLBACK(signalTooltipQuery), this ));
+#if !GTK_CHECK_VERSION(4,0,0)
m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "button-press-event", G_CALLBACK(signalButton), this ));
m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "motion-notify-event", G_CALLBACK(signalMotion), this ));
m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "button-release-event", G_CALLBACK(signalButton), this ));
@@ -2614,7 +2616,6 @@ bool GtkSalFrame::GetModal() const
return gtk_window_get_modal(GTK_WINDOW(m_pWindow));
}
-#if !GTK_CHECK_VERSION(4, 0, 0)
gboolean GtkSalFrame::signalTooltipQuery(GtkWidget*, gint /*x*/, gint /*y*/,
gboolean /*keyboard_mode*/, GtkTooltip *tooltip,
gpointer frame)
@@ -2634,7 +2635,6 @@ gboolean GtkSalFrame::signalTooltipQuery(GtkWidget*, gint /*x*/, gint /*y*/,
gtk_tooltip_set_tip_area(tooltip, &aHelpArea);
return true;
}
-#endif
bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const tools::Rectangle& rHelpArea)
{
More information about the Libreoffice-commits
mailing list