diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-12-17 14:32:41 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-12-17 14:32:41 +0000 |
commit | f0c0a39c22302ebccbe9645f41278f3f8db16f25 (patch) | |
tree | 31760b506f48a83a868d3adc4f1fdd3919fe2ed6 /accessibility | |
parent | 080cf6336cf3bfff4d55e4b94717c96405761208 (diff) |
INTEGRATION: CWS geordi2q11 (1.6.32); FILE MERGED
2003/12/15 16:13:02 hr 1.6.32.1: #111934#: join CWS gnomeaccpp1r1
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/bridge/org/openoffice/java/accessibility/Frame.java | 2 | ||||
-rw-r--r-- | accessibility/bridge/org/openoffice/java/accessibility/Window.java | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java index 4a0c44a5a99f..a055d2051221 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java @@ -65,6 +65,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi boolean opened = false; boolean visible = false; + boolean active = false; java.awt.EventQueue eventQueue = null; @@ -205,6 +206,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi protected void setComponentState(short state, boolean enable) { switch (state) { case AccessibleStateType.ACTIVE: + active = enable; if (enable) { AccessibleObjectFactory.postWindowActivated(Frame.this); } else { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Window.java b/accessibility/bridge/org/openoffice/java/accessibility/Window.java index c02ff91cad56..81a85cf991c6 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Window.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Window.java @@ -182,6 +182,13 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces public void dispose() { setVisible(false); postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED); + + // Transfer window focus back to the owner window if it is still the active frame + if ((getOwner() instanceof Frame && ((Frame) getOwner()).active) || + (getOwner() instanceof Dialog && ((Dialog) getOwner()).active)) { + eventQueue.postEvent(new java.awt.event.WindowEvent(getOwner(), + java.awt.event.WindowEvent.WINDOW_GAINED_FOCUS)); + } } protected void postWindowEvent(int i) { |