Fixed: #936 Invalid character when pressing DEL key under Linux

This commit is contained in:
kervala 2010-05-25 07:40:26 +02:00
parent 2a437309aa
commit fb396b3cb6

View file

@ -312,6 +312,10 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server)
// TODO manage the bool (first time pressed) // TODO manage the bool (first time pressed)
server.postEvent (new CEventKeyDown (key, getKeyButton(event.xbutton.state), true, this)); server.postEvent (new CEventKeyDown (key, getKeyButton(event.xbutton.state), true, this));
// don't send a control character when deleting
if (key == KeyDELETE)
c = 0;
Text[c] = '\0'; Text[c] = '\0';
if(c>0) if(c>0)
{ {