src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java

Print this page




1209                         fw = actualFocusedWindow;
1210                         actualFocusedWindow = null;
1211                         if (null == fw || !fw.isVisible() || !fw.isFocusableWindow()) {
1212                             fw = XDecoratedPeer.this;
1213                         }
1214                     }
1215                     fw.handleWindowFocusIn_Dispatch();
1216                 }
1217             }));
1218         }
1219     }
1220 
1221     public void handleWindowFocusOut(Window oppositeWindow, long serial) {
1222         Window actualFocusedWindow = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusedWindow();
1223 
1224         // If the actual focused window is not this decorated window then retain it.
1225         if (actualFocusedWindow != null && actualFocusedWindow != target) {
1226             Window owner = XWindowPeer.getDecoratedOwner(actualFocusedWindow);
1227 
1228             if (owner != null && owner == target) {
1229                 setActualFocusedWindow((XWindowPeer) AWTAccessor.getComponentAccessor().getPeer(actualFocusedWindow));
1230             }
1231         }
1232         super.handleWindowFocusOut(oppositeWindow, serial);
1233     }
1234 }


1209                         fw = actualFocusedWindow;
1210                         actualFocusedWindow = null;
1211                         if (null == fw || !fw.isVisible() || !fw.isFocusableWindow()) {
1212                             fw = XDecoratedPeer.this;
1213                         }
1214                     }
1215                     fw.handleWindowFocusIn_Dispatch();
1216                 }
1217             }));
1218         }
1219     }
1220 
1221     public void handleWindowFocusOut(Window oppositeWindow, long serial) {
1222         Window actualFocusedWindow = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusedWindow();
1223 
1224         // If the actual focused window is not this decorated window then retain it.
1225         if (actualFocusedWindow != null && actualFocusedWindow != target) {
1226             Window owner = XWindowPeer.getDecoratedOwner(actualFocusedWindow);
1227 
1228             if (owner != null && owner == target) {
1229                 setActualFocusedWindow(AWTAccessor.getComponentAccessor().getPeer(actualFocusedWindow));
1230             }
1231         }
1232         super.handleWindowFocusOut(oppositeWindow, serial);
1233     }
1234 }