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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 25 10:57:06 UTC 2020


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

New commits:
commit d27a41606bc1d860b1d7b07d9f3e004a52947ac6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 25 10:45:08 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 25 12:56:16 2020 +0200

    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 at redhat.com>

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 3b82be6f4f7d..fa08c1e64617 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 85762c4893f1..480aa2ee70a6 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)


More information about the Libreoffice-commits mailing list