diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-12-12 16:11:35 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-12-12 23:10:56 +0100 |
commit | 5bb798a99e7b178ac57ee8c15238534723000bf9 (patch) | |
tree | 8640af2b7bf8b86a43d1a176ff5fe20b0093197a /embeddedobj/source | |
parent | ee6787fc5597b7f730c4ee3a1f2a1b261d0a5644 (diff) |
tdf#117295 WIN no main loop shortcut for OLE dialog
Normally we handle Idle events directly without posting events
to the main event queue, as there seem to be no way to post them
to the end of the queue and this starves system events.
This prevents using this short-cut, as the default Windows event
processing doesn't know of this special handling.
Eventually this hack should be removed by simply always processing
all pending events...
Change-Id: If9ae81ca7e847743f9251343e106dbf566371584
Reviewed-on: https://gerrit.libreoffice.org/65040
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'embeddedobj/source')
-rw-r--r-- | embeddedobj/source/msole/xdialogcreator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index f94020a65a8f..be26a300d298 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -44,6 +44,10 @@ #include <oledlg.h> +#include <svsys.h> +#include <win/saldata.hxx> +#include <win/salinst.h> + class InitializedOleGuard { public: @@ -174,6 +178,11 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if( !pInsertFct ) throw uno::RuntimeException(); + // Disable any event loop shortcuts by enabling a real timer. + // This way the native windows dialog won't block our own processing. + BOOL const ret = PostMessageW(GetSalData()->mpInstance->mhComWnd, SAL_MSG_FORCE_REAL_TIMER, 0, 0); + SAL_WARN_IF(0 == ret, "embeddedobj.ole", "ERROR: PostMessage() failed!"); + uTemp=pInsertFct(&io); if ( OLEUI_OK != uTemp ) |