Fixed broken key handling
authorromashin
Sat, 19 Apr 2008 18:38:21 +0300
changeset 16814 4271f564b62012177ae654bd582369e2b691d529
parent 16813 f35018ecbc7c93cb4bf7340cb8175750bbe058cf
child 16815 434741bdff4484597625a694cf7182e0e99ec16c
push id1298
push userpavlov@mozilla.com
push dateSun, 17 Aug 2008 05:03:09 +0000
treeherderautoland@4a506fa751d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0a1pre
Fixed broken key handling
widget/src/qt/nsCommonWidget.cpp
--- a/widget/src/qt/nsCommonWidget.cpp
+++ b/widget/src/qt/nsCommonWidget.cpp
@@ -84,32 +84,29 @@ nsCommonWidget::InitKeyEvent(nsKeyEvent 
     aEvent.time      = 0;
 
     // The transformations above and in gdk for the keyval are not invertible
     // so link to the GdkEvent (which will vanish soon after return from the
     // event callback) to give plugins access to hardware_keycode and state.
     // (An XEvent would be nice but the GdkEvent is good enough.)
     aEvent.nativeMsg = (void *)aQEvent;
 
-//    aEvent.time      = aGdkEvent->time;
-/*
-    if (qEvent->text().length() && qEvent->text()[0].isPrint()) {
-        nsEvent->charCode = (PRInt32)qEvent->text()[0].unicode();
+    if (aQEvent->text().length() && aQEvent->text()[0].isPrint()) {
+        aEvent.charCode = (PRInt32)aQEvent->text()[0].unicode();
     }
     else {
-        nsEvent->charCode = 0;
+        aEvent.charCode = 0;
     }
 
-    if (nsEvent->charCode) {
-        nsEvent->keyCode = 0;
+    if (aEvent.charCode) {
+        aEvent.keyCode = 0;
     }
     else {
-        nsEvent->keyCode = QtKeyCodeToDOMKeyCode(qEvent->key());
+        aEvent.keyCode = QtKeyCodeToDOMKeyCode(aQEvent->key());
     }
-*/
 }
 
 void
 nsCommonWidget::DispatchGotFocusEvent(void)
 {
     nsGUIEvent event(PR_TRUE, NS_GOTFOCUS, this);
     nsEventStatus status;
     DispatchEvent(&event, status);