diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-08-08 15:03:37 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-09-21 09:04:29 +0200 |
commit | 9796f792fef69bbe01b674365643d1fbb79918b4 (patch) | |
tree | bc684f43077f5b70ec5553d4f5253ca57f0b023b /vcl/osx/a11ytextwrapper.mm | |
parent | 4067487eb304c6686a22319c51790e41e311de08 (diff) |
tdf#99784 OSX run GUI stuff in the main thread
The extension manager starts dialogs from its own thread. But the
OSX backend currently doesn't defer these calls to the main thread.
This implements the deference by running the called function
in the main thread, using a code ^Block, and returning the result
via a SalYieldMutex member.
Change-Id: Id8977991e3eda91da27c23d8021e028d4f4cefe5
Reviewed-on: https://gerrit.libreoffice.org/42448
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/osx/a11ytextwrapper.mm')
-rw-r--r-- | vcl/osx/a11ytextwrapper.mm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/osx/a11ytextwrapper.mm b/vcl/osx/a11ytextwrapper.mm index a46ffd6e7fd9..14a63aa8fd9e 100644 --- a/vcl/osx/a11ytextwrapper.mm +++ b/vcl/osx/a11ytextwrapper.mm @@ -203,8 +203,8 @@ using namespace ::com::sun::star::uno; +(id)rangeForPositionAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)point { NSValue * value = nil; - Point aPoint( [ AquaA11yUtil nsPointToVclPoint: point ]); - const Point screenPos = [ wrapper accessibleComponent ] -> getLocationOnScreen(); + css::awt::Point aPoint( [ AquaA11yUtil nsPointToVclPoint: point ]); + const css::awt::Point screenPos = [ wrapper accessibleComponent ] -> getLocationOnScreen(); aPoint.X -= screenPos.X; aPoint.Y -= screenPos.Y; sal_Int32 index = [ wrapper accessibleText ] -> getIndexAtPoint( aPoint ); @@ -239,9 +239,9 @@ using namespace ::com::sun::star::uno; } if ( [ wrapper accessibleComponent ] ) { // get location on screen (must be added since get CharacterBounds returns values relative to parent) - Point screenPos = [ wrapper accessibleComponent ] -> getLocationOnScreen(); - Point pos ( minx + screenPos.X, miny + screenPos.Y ); - Point size ( maxx - minx, maxy - miny ); + css::awt::Point screenPos = [ wrapper accessibleComponent ] -> getLocationOnScreen(); + css::awt::Point pos ( minx + screenPos.X, miny + screenPos.Y ); + css::awt::Point size ( maxx - minx, maxy - miny ); NSValue * nsPos = [ AquaA11yUtil vclPointToNSPoint: pos ]; rect = [ NSValue valueWithRect: NSMakeRect ( [ nsPos pointValue ].x, [ nsPos pointValue ].y - size.Y, size.X, size.Y ) ]; //printf("Range: %s --- Rect: %s\n", [ NSStringFromRange ( [ range rangeValue ] ) UTF8String ], [ NSStringFromRect ( [ rect rectValue ] ) UTF8String ]); |