vcl/osx/salinst.cxx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
New commits: commit 50e337f1f1c1c8c3f04d8ce0f1515118a7700fed Author: Patrick Luby <[email protected]> AuthorDate: Sun Mar 1 09:40:02 2026 -0500 Commit: Patrick Luby <[email protected]> CommitDate: Sun Mar 1 17:13:42 2026 +0100 Related: tdf#155092 don't rely on cached "in live resize" value After dragging a window with the Option key pressed (see https://bugs.documentfoundation.org/show_bug.cgi?id=170740#c6), ImplGetSVData()->mpWinData->mbIsLiveResize remains set to true because the current event needs to be dispatched for ImplGetSVData()->mpWinData->mbIsLiveResize to be reset to false. This causes dispatching to become an infinite wait for the current NSEventTypeLeftMouseUp event to get dispatched. So query the native window directly to get the real live resizing status. Important note: at least on macOS 26.3 Tahoe, calling -[NSEvent window] is very slow so call it only when ImplGetSVData()->mpWinData->mbIsLiveResize is true. Change-Id: Ife328b2a14ae6e0c3fdc4b502ec9ade7f689320d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200707 Reviewed-by: Patrick Luby <[email protected]> Tested-by: Jenkins diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 4c1e554397f6..96a7778fc27d 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -588,8 +588,24 @@ bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) // resizing appears to end in the next mouse down event. if ( ImplGetSVData()->mpWinData->mbIsLiveResize && [pEvent type] == NSEventTypeLeftMouseUp ) { - [NSApp postEvent: pEvent atStart: YES]; - return false; + // After dragging a window with the Option key pressed (see + // https://bugs.documentfoundation.org/show_bug.cgi?id=170740#c6), + // ImplGetSVData()->mpWinData->mbIsLiveResize remains set + // to true because the current event needs to be dispatched + // for ImplGetSVData()->mpWinData->mbIsLiveResize to be + // reset to false. This causes dispatching to become an + // infinite wait for the current NSEventTypeLeftMouseUp + // event to get dispatched. So query the native window + // directly to get the real live resizing status. + // Important note: at least on macOS 26.3 Tahoe, calling + // -[NSEvent window] is very slow so call it only when + // ImplGetSVData()->mpWinData->mbIsLiveResize is true. + NSWindow *pEventWindow = [pEvent window]; + if ( [pEventWindow inLiveResize] ) + { + [NSApp postEvent: pEvent atStart: YES]; + return false; + } } [NSApp sendEvent: pEvent];
