summaryrefslogtreecommitdiff
path: root/i18npool/CustomTarget_breakiterator.mk
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2020-02-25 10:02:25 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2020-02-26 17:02:32 +0100
commit518c0265efebf39ab6d1e90c4ec4e7cf52b701c6 (patch)
tree35763c079dfaf0fff2ca97dca498d76a9348e8ec /i18npool/CustomTarget_breakiterator.mk
parent3a69e1a6b8eab79c55b6e8f3edd2ee2da45b39c0 (diff)
WIN prevent deadlock in SetForegroundWindow
As mentioned in various blogs, like Raymon Chens "The old new thing", 2008-08-01, "I warned you: The dangers of attaching input queues", using AttachThreadInput to steal the input from an other thread, so SetForegroundWindow becomes more reliable, can deadlock in that call in win32u.dll!NtUserCallHwndLock. Stackoverflow also has a multitude of suggestions and links in "Win32 SetForegroundWindow unreliable", to circumvent Windows focus-stealing prevention mechanisms. A customer is experiencing these hangs reliably and often when opening LO windows via Java UNO, because the Window and the UNO thread are different and trigger this code path. Removing the calls to AttachThreadInput fixes the problem for them. This has started lately and nobody really knows why. I also know other customers with a similar Java UNO setup, which don't experience them. For better foreground handling, the calling app eventually should either use AllowSetForegroundWindow or CoAllowSetForegroundWindow (for COM servers), to give up the foreground / input handling. So this just drops the AttachThreadInput calls. Change-Id: I8de0a17aaaa44c24b1ee728b2ef6ec3aea951c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89527 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'i18npool/CustomTarget_breakiterator.mk')
0 files changed, 0 insertions, 0 deletions