salinst.cxx (343cc52d) salinst.cxx (37f4cb17)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 767 unchanged lines hidden (view full) ---

776 if( (*it)->mbShown && ! (*it)->maInvalidRect.IsEmpty() )
777 {
778 (*it)->Flush( (*it)->maInvalidRect );
779 (*it)->maInvalidRect.SetEmpty();
780 }
781 }
782 osl_setCondition( maWaitingYieldCond );
783 }
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 767 unchanged lines hidden (view full) ---

776 if( (*it)->mbShown && ! (*it)->maInvalidRect.IsEmpty() )
777 {
778 (*it)->Flush( (*it)->maInvalidRect );
779 (*it)->maInvalidRect.SetEmpty();
780 }
781 }
782 osl_setCondition( maWaitingYieldCond );
783 }
784 else if( bWait )
784 else if( bWait && maWaitingYieldCond )
785 {
786 // #i103162#
787 // wait until any thread (most likely the main thread)
785 {
786 // #i103162#
787 // wait until any thread (most likely the main thread)
788 // has dispatched an event, cop out at 200 ms
788 // has dispatched an event, cop out at 500 ms
789 sal_uLong nCount;
790 TimeValue aVal = { 0, 500000000 };
789 osl_resetCondition( maWaitingYieldCond );
791 osl_resetCondition( maWaitingYieldCond );
790 TimeValue aVal = { 0, 200000000 };
791 sal_uLong nCount = ReleaseYieldMutex();
792 nCount = ReleaseYieldMutex();
792 osl_waitCondition( maWaitingYieldCond, &aVal );
793 AcquireYieldMutex( nCount );
794 }
793 osl_waitCondition( maWaitingYieldCond, &aVal );
794 AcquireYieldMutex( nCount );
795 }
795
796 // we get some apple events way too early
797 // before the application is ready to handle them,
798 // so their corresponding application events need to be delayed
799 // now is a good time to handle at least one of them
800 if( bWait && !aAppEventList.empty() && ImplGetSVData()->maAppData.mbInAppExecute )
801 {
802 // make sure that only one application event is active at a time
803 static bool bInAppEvent = false;

--- 510 unchanged lines hidden ---
796 // we get some apple events way too early
797 // before the application is ready to handle them,
798 // so their corresponding application events need to be delayed
799 // now is a good time to handle at least one of them
800 if( bWait && !aAppEventList.empty() && ImplGetSVData()->maAppData.mbInAppExecute )
801 {
802 // make sure that only one application event is active at a time
803 static bool bInAppEvent = false;

--- 510 unchanged lines hidden ---