vcl/source/control/edit.cxx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
New commits: commit 5802927f319a2174f6536ff2ceac0a2c5c6d158e Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue May 10 11:56:32 2022 +0300 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Sun May 15 20:14:53 2022 +0200 Fix a problem with multiple tunneled dialogs in Online If your Collabora Online installation uses VCL theming, and you have two tunnelled dialogs open (with the second one being "logically" a child of the first, even though I don't think the code in Online or here in core necessarily has any such concepts), typing into a text field of the second dialog is very hard. One has to keep clicking in the field for each character typed. Core and Online are confused which dialog should have focus, or something. This change seems to help, but I definitely don't fully understand the mechanisms. The change affects only LibreOfficeKit clients, i.e. mainly Collabora Online. Change-Id: I5337989f5ea57a72d83691653f554e7754667fe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134108 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index f631500b8408..e9cd6f2b4bdf 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -445,8 +445,9 @@ void Edit::ImplInvalidateOrRepaint() if( IsPaintTransparent() ) { Invalidate(); - // FIXME: this is currently only on macOS - if( ImplGetSVData()->maNWFData.mbNoFocusRects ) + // FIXME: this was only for macOS, unclear now. + if( !comphelper::LibreOfficeKit::isActive() && + ImplGetSVData()->maNWFData.mbNoFocusRects ) PaintImmediately(); } else @@ -1875,9 +1876,10 @@ void Edit::GetFocus() ImplShowCursor(); - // FIXME: this is currently only on macOS + // FIXME: this was only on macOS // check for other platforms that need similar handling - if( ImplGetSVData()->maNWFData.mbNoFocusRects && + if( !comphelper::LibreOfficeKit::isActive() && + ImplGetSVData()->maNWFData.mbNoFocusRects && IsNativeWidgetEnabled() && IsNativeControlSupported( ControlType::Editbox, ControlPart::Entire ) ) { @@ -1902,15 +1904,15 @@ void Edit::LoseFocus() { if ( !mpSubEdit ) { - // FIXME: this is currently only on macOS + // FIXME: this was only on macOS // check for other platforms that need similar handling - if( ImplGetSVData()->maNWFData.mbNoFocusRects && + if( !comphelper::LibreOfficeKit::isActive() && + ImplGetSVData()->maNWFData.mbNoFocusRects && IsNativeWidgetEnabled() && IsNativeControlSupported( ControlType::Editbox, ControlPart::Entire ) ) { ImplInvalidateOutermostBorder( mbIsSubEdit ? GetParent() : this ); } - if ( !mbActivePopup && !( GetStyle() & WB_NOHIDESELECTION ) && maSelection.Len() ) ImplInvalidateOrRepaint(); // paint the selection } @@ -2339,9 +2341,11 @@ void Edit::Modify() // #i13677# notify edit listeners about caret position change CallEventListeners( VclEventId::EditCaretChanged ); - // FIXME: this is currently only on macOS + + // FIXME: this was only on macOS // check for other platforms that need similar handling - if( ImplGetSVData()->maNWFData.mbNoFocusRects && + if( !comphelper::LibreOfficeKit::isActive() && + ImplGetSVData()->maNWFData.mbNoFocusRects && IsNativeWidgetEnabled() && IsNativeControlSupported( ControlType::Editbox, ControlPart::Entire ) ) {