don't process generated key events if the system is busy

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18376 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-05-17 08:24:44 +00:00
parent aa9f87addb
commit 032d16501d

View File

@ -414,6 +414,15 @@ void GuiWorkArea::generateSyntheticMouseEvent()
void GuiWorkArea::keyPressEvent(QKeyEvent * e)
{
// do nothing if there are other events
// (the auto repeated events come too fast)
if(e->isAutoRepeat() && QCoreApplication::hasPendingEvents()) {
LYXERR(Debug::KEY) << BOOST_CURRENT_FUNCTION << endl
<< "key ignored" << endl;
e->ignore();
return;
}
LYXERR(Debug::KEY) << BOOST_CURRENT_FUNCTION
<< " count=" << e->count()
<< " text=" << fromqstr(e->text())