summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-05-08 21:43:46 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-05-08 21:43:46 +0100
commitade994548c593ea1185711a3e226f51a99fbb660 (patch)
tree1a17002e98656e8be9d72602605e4b952aa60c48
parentdaff06ba3fffa23086f1f1f610207f80f4fe6b44 (diff)
quit after emitting all the events to allow valgrinding.
Change-Id: Ibee9d8f00008dd0a266db276772d48deb0bd9d18
-rw-r--r--vcl/source/window/debugevent.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 2f3767826261..37ca7169f71b 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -120,7 +120,7 @@ void DebugEventInjector::InjectMenuEvent()
static void InitKeyEvent( SalKeyEvent &rKeyEvent )
{
double nRand = getRandom();
- if (nRand < 0.01)
+ if (nRand < 0.001)
rKeyEvent.mnTime = getRandom() * ULONG_MAX;
else
rKeyEvent.mnTime = Time::GetSystemTicks();
@@ -216,14 +216,15 @@ void DebugEventInjector::InjectKeyNavEdit()
InitKeyEvent( aKeyEvent );
aKeyEvent.mnCode = nKey;
- if (getRandom() < 0.10) // modifier
+ if (getRandom() < 0.15) // modifier
aKeyEvent.mnCode |= (sal_uInt16)(getRandom() * KEY_MODTYPE) & KEY_MODTYPE;
aKeyEvent.mnCharCode = 0x0; // hopefully unused.
- bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent);
- fprintf (stderr, "Injected edit / move key 0x%x -> %d win %p\n",
- (int) aKeyEvent.mnCode, (int)bHandled, pWindow);
+ bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent );
+ fprintf( stderr, "Injected edit / move key 0x%x -> %d win %p\n",
+ (int) aKeyEvent.mnCode, (int)bHandled, pWindow );
+ ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent );
}
void DebugEventInjector::Timeout()
@@ -235,6 +236,8 @@ void DebugEventInjector::Timeout()
SetTimeout( 1 );
Start();
}
+ else
+ Application::Quit();
}
DebugEventInjector *DebugEventInjector::getCreate()