Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2001-09-17 18:31:08 +0000
committerGrant Gayed2001-09-17 18:31:08 +0000
commit5a7cac4a081a994306949adf6ff29842d0deb46c (patch)
tree5186d97cc21dbced0312067f6c9a8b2c94d0cf08 /bundles
parent05c4a392c73a17b5ff59fd964fa159a63e8c38fd (diff)
downloadeclipse.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
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java11
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 ();

Back to the top