stifui/avkon/uitestserverstarter/src/AknUiEnvProxy.cpp
branchRCL_3
changeset 11 454d022d514b
parent 9 404ad6c9bc20
--- a/stifui/avkon/uitestserverstarter/src/AknUiEnvProxy.cpp	Tue Apr 27 16:38:40 2010 +0300
+++ b/stifui/avkon/uitestserverstarter/src/AknUiEnvProxy.cpp	Tue May 11 16:14:15 2010 +0300
@@ -212,6 +212,8 @@
 	TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
 	User::LeaveIfError( ret );
 	
+	wsSession.Flush();
+	
 	// Request notification when key press is handled
 	*aStatus = KRequestPending;
 	iAppUi->NotifyAboutHandledKeyPress( aStatus );
@@ -257,6 +259,7 @@
 	TInt wgId = wsSession.GetFocusWindowGroup();	
 	TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );	
 	User::LeaveIfError( ret );
+	wsSession.Flush();
 	}
 
 
@@ -309,6 +312,7 @@
 		// Send single character from text to UI component
 		TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
 		User::LeaveIfError( ret );
+		wsSession.Flush();
 		}
 		
 	// Request notification when send text is recived
@@ -359,6 +363,7 @@
 		// Send single character from text to UI component
 		TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );			
 		User::LeaveIfError( ret );
+		wsSession.Flush();
 		}
 	}
 
@@ -422,7 +427,9 @@
 				User::Leave( KErrArgument );
 			}
 		wsSession.SimulateRawEvent( pointerEventDown );
+		wsSession.Flush();
 		wsSession.SimulateRawEvent( pointerEventUp );
+		wsSession.Flush();
 		}
 	else
 		{
@@ -497,11 +504,13 @@
 			}
 		
 			CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventDown );
+			wsSession.Flush();
 			
 			// Send info to AppUi that we are going to send key event
 			iAppUi->PrepareToPointerEvent();
 	
 			CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventUp );
+			wsSession.Flush();
 	
 			// Request notification when key press is handled
 			*aStatus = KRequestPending;