summaryrefslogtreecommitdiff
path: root/sw/source/core/view
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2021-04-09 09:08:37 +1000
committerMiklos Vajna <vmiklos@collabora.com>2021-04-14 08:25:05 +0200
commit0fedac18214a6025401c4c426466a5166553e8ec (patch)
treec665927ce2246759a662a8da0556fb2817fb07ed /sw/source/core/view
parenta4836c01a94454ae52aa97b29a7ec26fb26aa03c (diff)
tdf#141556 Fix 100% CPU usage in Writer idle loop
Do not interrupt the idle layout processing unnecessarily, because if it is continually interrupted before making enough progress then it will keep resuming at the same page, never finishing, constantly using CPU. This is achieved with two changes: - Revert "tdf#123583 use TaskStopwatch for Writer Idle loop" (commit 383032c50a3e3354f04200ce984a47ab9d2c5c67) which introduced a stopwatch timer to interrupt idle processing every 50ms. This reversion restores the previous behaviour where idle processing is interrupted only when there is an input event. - Filter out TIMER events so that they do not interrupt the idle loop; this fixes both tdf#123583 and tdf#141556 Conflicts: sw/source/core/inc/layact.hxx sw/source/core/layout/layact.cxx Change-Id: Ic989631e5f32199209d64b66b72059253fc0167a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113825 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/core/view')
-rw-r--r--sw/source/core/view/viewsh.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 4ec987fd777b..522813e4b912 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -284,6 +284,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
aAction.SetComplete( false );
if ( mnLockPaint )
aAction.SetPaint( false );
+ aAction.SetInputType( VclInputFlags::KEYBOARD );
aAction.Action(GetWin());
}