@@ -16,6 +16,7 @@ Changelist for version 1.45 | |||||
- added a critical section option to ReferenceCountedArray | - added a critical section option to ReferenceCountedArray | ||||
- refactored and added features to the Socket class, replacing it with StreamableSocket (basically the same as the original class), and DatagramSocket. | - refactored and added features to the Socket class, replacing it with StreamableSocket (basically the same as the original class), and DatagramSocket. | ||||
- refactored the OpenGLComponent, adding new classes OpenGLPixelFormat and OpenGLContext | - refactored the OpenGLComponent, adding new classes OpenGLPixelFormat and OpenGLContext | ||||
- A component's KeyListeners are now called before its keyPressed method, so if you want to intercept keys and stop them getting sent to the component, you can add a keylistener and comsume the events. | |||||
============================================================================== | ============================================================================== | ||||
Changelist for version 1.44 | Changelist for version 1.44 | ||||
@@ -434,11 +434,6 @@ bool ComponentPeer::handleKeyPress (const int keyCode, | |||||
{ | { | ||||
const ComponentDeletionWatcher deletionChecker (target); | const ComponentDeletionWatcher deletionChecker (target); | ||||
keyWasUsed = target->keyPressed (keyInfo); | |||||
if (keyWasUsed || deletionChecker.hasBeenDeleted()) | |||||
break; | |||||
if (target->keyListeners_ != 0) | if (target->keyListeners_ != 0) | ||||
{ | { | ||||
for (int i = target->keyListeners_->size(); --i >= 0;) | for (int i = target->keyListeners_->size(); --i >= 0;) | ||||
@@ -452,6 +447,11 @@ bool ComponentPeer::handleKeyPress (const int keyCode, | |||||
} | } | ||||
} | } | ||||
keyWasUsed = target->keyPressed (keyInfo); | |||||
if (keyWasUsed || deletionChecker.hasBeenDeleted()) | |||||
break; | |||||
if (keyInfo.isKeyCode (KeyPress::tabKey) && Component::getCurrentlyFocusedComponent() != 0) | if (keyInfo.isKeyCode (KeyPress::tabKey) && Component::getCurrentlyFocusedComponent() != 0) | ||||
{ | { | ||||
Component::getCurrentlyFocusedComponent() | Component::getCurrentlyFocusedComponent() | ||||