[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 15 16:26:15 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 491efa1e5513f9c7901849dfb2c72e379efc91bd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 15 13:01:12 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 15 17:25:35 2020 +0100
tdf#138932 don't replace . with , for gtk password GtkEntries too
Change-Id: I26e9f878791a4349d065bb8603862919ff4b9e85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107766
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5a7c39ad8b06..6abc74d4f9ed 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2117,8 +2117,14 @@ private:
// #i1820# use locale specific decimal separator
if (pEvent->keyval == GDK_KEY_KP_Decimal && Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep())
{
- OUString aSep(Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep());
- pEvent->keyval = aSep[0];
+ GtkWindow* pFocusWin = get_focus_window();
+ GtkWidget* pFocus = pFocusWin ? gtk_window_get_focus(pFocusWin) : nullptr;
+ // tdf#138932 except if the target is a GtkEntry used for passwords
+ if (!pFocus || !GTK_IS_ENTRY(pFocus) || gtk_entry_get_visibility(GTK_ENTRY(pFocus)))
+ {
+ OUString aSep(Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep());
+ pEvent->keyval = aSep[0];
+ }
}
GtkInstanceWidget* pThis = static_cast<GtkInstanceWidget*>(widget);
More information about the Libreoffice-commits
mailing list