[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jan 7 10:14:46 UTC 2019


 sw/source/uibase/docvw/edtwin.cxx |   10 +++++-----
 sw/source/uibase/inc/edtwin.hxx   |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 8b8d1af48d40494e0b0c5d2c8d2b12fb9e62b23a
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jan 3 16:43:30 2019 +0300
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Mon Jan 7 11:14:24 2019 +0100

    tdf#122442: use Timer to detect single-clicks vs double-clicks
    
    Regression from commit 821ae0fb9fa63e0171f987d5ec210ec121978b8f which
    appeared after commits changing scheduler/main loop in the range
    e6e8a060ecc6e4fd51cfe88e00d841d546ed5915..9b4abcd1c45a646a1ac9120fe1c489ba6bb44e95
    
    Change-Id: I6cf58c1e83aa9621bdd4b5c14f8565d5c69e20c1
    Reviewed-on: https://gerrit.libreoffice.org/65837
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 6207c51880c9165eedb1d1af7fdc5e179bc8844d)
    Reviewed-on: https://gerrit.libreoffice.org/65841
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 1f1cb9adf328..2e9f77b1a063 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4757,12 +4757,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
                     rSh.EnterStdMode();
                     rSh.SetVisibleCursor(aDocPt);
                     bCallBase = false;
-                    m_aTemplateIdle.Stop();
+                    m_aTemplateTimer.Stop();
                 }
                 else if(rMEvt.GetClicks() == 1)
                 {
                     // no selection -> so turn off watering can
-                    m_aTemplateIdle.Start();
+                    m_aTemplateTimer.Start();
                 }
             }
         }
@@ -4998,9 +4998,9 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
     m_aKeyInputFlushTimer.SetInvokeHandler(LINK(this, SwEditWin, KeyInputFlushHandler));
 
     // TemplatePointer for colors should be resetted without
-    // selection after single click
-    m_aTemplateIdle.SetPriority(TaskPriority::LOWEST);
-    m_aTemplateIdle.SetInvokeHandler(LINK(this, SwEditWin, TemplateTimerHdl));
+    // selection after single click, but not after double-click (tdf#122442)
+    m_aTemplateTimer.SetTimeout(GetSettings().GetMouseSettings().GetDoubleClickTime());
+    m_aTemplateTimer.SetInvokeHandler(LINK(this, SwEditWin, TemplateTimerHdl));
 
     // temporary solution!!! Should set the font of the current
     // insert position at every cursor movement!
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index b8f473f35fe3..0f63aa229884 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -81,7 +81,7 @@ class SwEditWin final : public vcl::Window,
     Point           m_aStartPos;
     Point           m_aMovePos;
     Point           m_aRszMvHdlPt;
-    Idle            m_aTemplateIdle;
+    Timer           m_aTemplateTimer;
 
     // type/object where the mouse pointer is
     SwCallMouseEvent m_aSaveCallEvent;


More information about the Libreoffice-commits mailing list