зеркало из https://github.com/mozilla/gecko-dev.git
Fixed broken key handling
This commit is contained in:
Родитель
a8b92f8738
Коммит
3f7da5ec7f
|
@ -89,22 +89,19 @@ nsCommonWidget::InitKeyEvent(nsKeyEvent &aEvent, QKeyEvent *aQEvent)
|
||||||
// (An XEvent would be nice but the GdkEvent is good enough.)
|
// (An XEvent would be nice but the GdkEvent is good enough.)
|
||||||
aEvent.nativeMsg = (void *)aQEvent;
|
aEvent.nativeMsg = (void *)aQEvent;
|
||||||
|
|
||||||
// aEvent.time = aGdkEvent->time;
|
if (aQEvent->text().length() && aQEvent->text()[0].isPrint()) {
|
||||||
/*
|
aEvent.charCode = (PRInt32)aQEvent->text()[0].unicode();
|
||||||
if (qEvent->text().length() && qEvent->text()[0].isPrint()) {
|
|
||||||
nsEvent->charCode = (PRInt32)qEvent->text()[0].unicode();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsEvent->charCode = 0;
|
aEvent.charCode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nsEvent->charCode) {
|
if (aEvent.charCode) {
|
||||||
nsEvent->keyCode = 0;
|
aEvent.keyCode = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsEvent->keyCode = QtKeyCodeToDOMKeyCode(qEvent->key());
|
aEvent.keyCode = QtKeyCodeToDOMKeyCode(aQEvent->key());
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Загрузка…
Ссылка в новой задаче