Fix for bug 10515, an error in keybinding logic
This commit is contained in:
Родитель
fb013a06b1
Коммит
93abd59b34
|
@ -297,6 +297,19 @@ nsresult nsXULKeyListenerImpl::DoKey(nsIDOMEvent* aKeyEvent, eEventType aEventTy
|
||||||
|
|
||||||
//printf("onkeypress [%s] \n", cmdToExecute.ToNewCString()); // this leaks
|
//printf("onkeypress [%s] \n", cmdToExecute.ToNewCString()); // this leaks
|
||||||
do {
|
do {
|
||||||
|
#ifdef XP_PC
|
||||||
|
// Test Command attribute
|
||||||
|
PRBool isCommand = PR_FALSE;
|
||||||
|
PRBool isControl = PR_FALSE;
|
||||||
|
theEvent->GetMetaKey(&isCommand);
|
||||||
|
theEvent->GetCtrlKey(&isControl);
|
||||||
|
if (((isCommand && (modCommand != "true")) ||
|
||||||
|
(!isCommand && (modCommand == "true"))) &&
|
||||||
|
((isControl && (modControl != "true")) ||
|
||||||
|
(!isControl && (modControl == "true"))))
|
||||||
|
break;
|
||||||
|
//printf("Passed command/ctrl test \n"); // this leaks
|
||||||
|
#else
|
||||||
// Test Command attribute
|
// Test Command attribute
|
||||||
PRBool isCommand = PR_FALSE;
|
PRBool isCommand = PR_FALSE;
|
||||||
theEvent->GetMetaKey(&isCommand);
|
theEvent->GetMetaKey(&isCommand);
|
||||||
|
@ -311,6 +324,7 @@ nsresult nsXULKeyListenerImpl::DoKey(nsIDOMEvent* aKeyEvent, eEventType aEventTy
|
||||||
(!isControl && (modControl == "true")))
|
(!isControl && (modControl == "true")))
|
||||||
break;
|
break;
|
||||||
//printf("Passed control test \n"); // this leaks
|
//printf("Passed control test \n"); // this leaks
|
||||||
|
#endif
|
||||||
|
|
||||||
// Test Shift attribute
|
// Test Shift attribute
|
||||||
PRBool isShift = PR_FALSE;
|
PRBool isShift = PR_FALSE;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче