summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
index 1e996cff9e..98fd6554b0 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
@@ -525,6 +525,20 @@ private int OnControlInfoChanged() {
}
return COM.S_OK;
}
+void onFocusIn(Event e) {
+ if (objIOleInPlaceObject == null) return;
+ doVerb(OLE.OLEIVERB_UIACTIVATE);
+ if (isFocusControl()) return;
+ int[] phwnd = new int[1];
+ objIOleInPlaceObject.GetWindow(phwnd);
+ if (phwnd[0] == 0) return;
+ OS.SetFocus(phwnd[0]);
+}
+void onFocusOut(Event e) {
+ if (objIOleInPlaceObject != null) {
+ objIOleInPlaceObject.UIDeactivate();
+ }
+}
private int OnFocus(int fGotFocus) {
return COM.S_OK;
}