diff options
author | Grant Gayed | 2001-09-17 18:31:08 +0000 |
---|---|---|
committer | Grant Gayed | 2001-09-17 18:31:08 +0000 |
commit | 5a7cac4a081a994306949adf6ff29842d0deb46c (patch) | |
tree | 5186d97cc21dbced0312067f6c9a8b2c94d0cf08 | |
parent | 05c4a392c73a17b5ff59fd964fa159a63e8c38fd (diff) | |
download | eclipse.platform.swt-5a7cac4a081a994306949adf6ff29842d0deb46c.tar.gz eclipse.platform.swt-5a7cac4a081a994306949adf6ff29842d0deb46c.tar.xz eclipse.platform.swt-5a7cac4a081a994306949adf6ff29842d0deb46c.zip |
SN's redirect key events to focus widget change
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java index b69948e452..70a9f9fe06 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java @@ -1689,7 +1689,16 @@ void sendKeyEvent (int type, XKeyEvent xEvent) { Event event = new Event ();
event.time = xEvent.time;
setKeyState (event, xEvent);
- postEvent (type, event);
+ Control control = this;
+ if ((state & CANVAS) != 0) {
+ if ((style & SWT.NO_FOCUS) != 0) {
+ Display display = getDisplay ();
+ control = display.getFocusControl ();
+ }
+ }
+ if (control != null) {
+ control.postEvent (type, event);
+ }
}
void sendMouseEvent (int type, int button, XInputEvent xEvent) {
Event event = new Event ();
|