Related: tdf#135965 return true to show event was handled
Change-Id: I87ee0f990bf2c908a28bd212bdef870d245a9282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101313
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 3b82be6..fa08c1e 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -521,7 +521,7 @@ public:
static sal_uInt16 GetKeyModCode(guint nState);
static GdkEvent* makeFakeKeyPress(GtkWidget* pWidget);
static SalWheelMouseEvent GetWheelEvent(GdkEventScroll& rEvent);
static void NativeWidgetHelpPressed(GtkAccelGroup*, GObject*, guint,
static gboolean NativeWidgetHelpPressed(GtkAccelGroup*, GObject*, guint,
GdkModifierType, gpointer pFrame);
};
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 85762c4..480aa2ee 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3902,10 +3902,11 @@ private:
rtl::Reference<SalGtkXWindow> m_xWindow; //uno api
gulong m_nToplevelFocusChangedSignalId;
static void help_pressed(GtkAccelGroup*, GObject*, guint, GdkModifierType, gpointer widget)
static gboolean help_pressed(GtkAccelGroup*, GObject*, guint, GdkModifierType, gpointer widget)
{
GtkInstanceWindow* pThis = static_cast<GtkInstanceWindow*>(widget);
pThis->help();
return true;
}
static void signalToplevelFocusChanged(GtkWindow*, GParamSpec*, gpointer widget)
@@ -16336,11 +16337,11 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
// tdf#135965 for the case of native widgets inside a GtkSalFrame and F1 pressed, run help
// on gtk widget help ids until we hit a vcl parent and then use vcl window help ids
void GtkSalFrame::NativeWidgetHelpPressed(GtkAccelGroup*, GObject*, guint, GdkModifierType, gpointer pFrame)
gboolean GtkSalFrame::NativeWidgetHelpPressed(GtkAccelGroup*, GObject*, guint, GdkModifierType, gpointer pFrame)
{
Help* pHelp = Application::GetHelp();
if (!pHelp)
return;
return true;
GtkWindow* pWindow = static_cast<GtkWindow*>(pFrame);
@@ -16375,15 +16376,16 @@ void GtkSalFrame::NativeWidgetHelpPressed(GtkAccelGroup*, GObject*, guint, GdkMo
sHelpId = pChildWindow->GetHelpId();
}
if (!pChildWindow)
return;
return true;
pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), pChildWindow);
return;
return true;
}
if (!pWidget)
return;
return true;
std::unique_ptr<weld::Widget> xTemp(new GtkInstanceWidget(pWidget, nullptr, false));
pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), xTemp.get());
return true;
}
weld::Builder* GtkInstance::CreateInterimBuilder(vcl::Window* pParent, const OUString& rUIRoot, const OUString& rUIFile, sal_uInt64)