mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-01-29 02:06:48 +08:00
Handle RPC_E_CANTCALLOUT_ININPUTSYNCCALL in OfficeViewer resize (#1862)
This commit is contained in:
@@ -77,8 +77,19 @@ public class PreviewHandlerHost : Control
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
var r = ClientRectangle;
|
||||
_mCurrentPreviewHandler?.SetRect(ref r);
|
||||
try
|
||||
{
|
||||
var r = ClientRectangle;
|
||||
_mCurrentPreviewHandler?.SetRect(ref r);
|
||||
}
|
||||
catch (COMException ex) when (ex.HResult == unchecked((int)0x8001010D))
|
||||
{
|
||||
// RPC_E_CANTCALLOUT_ININPUTSYNCCALL
|
||||
// This exception occurs when an outgoing call cannot be made because
|
||||
// the application is dispatching an input-synchronous call.
|
||||
// It's safe to ignore this exception as the preview handler will be
|
||||
// resized on the next resize event.
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user