< prev index next >

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

Print this page




 801      */
 802     @Override
 803     public void handleConfigureNotifyEvent(XEvent xev) {
 804         XConfigureEvent xe = xev.get_xconfigure();
 805         /*
 806          * Correct window location which could be wrong in some cases.
 807          * See getNewLocation() for the details.
 808          */
 809         Point newLocation = getNewLocation(xe, 0, 0);
 810         xe.set_x(newLocation.x);
 811         xe.set_y(newLocation.y);
 812         checkIfOnNewScreen(new Rectangle(xe.get_x(),
 813                                          xe.get_y(),
 814                                          xe.get_width(),
 815                                          xe.get_height()));
 816 
 817         // Don't call super until we've handled a screen change.  Otherwise
 818         // there could be a race condition in which a ComponentListener could
 819         // see the old screen.
 820         super.handleConfigureNotifyEvent(xev);


 821         repositionSecurityWarning();
 822     }
 823 
 824     final void requestXFocus(long time) {
 825         requestXFocus(time, true);
 826     }
 827 
 828     final void requestXFocus() {
 829         requestXFocus(0, false);
 830     }
 831 
 832     /**
 833      * Requests focus to this top-level. Descendants should override to provide
 834      * implementations based on a class of top-level.
 835      */
 836     protected void requestXFocus(long time, boolean timeProvided) {
 837         // Since in XAWT focus is synthetic and all basic Windows are
 838         // override_redirect all we can do is check whether our parent
 839         // is active. If it is - we can freely synthesize focus transfer.
 840         // Luckily, this logic is already implemented in requestWindowFocus.




 801      */
 802     @Override
 803     public void handleConfigureNotifyEvent(XEvent xev) {
 804         XConfigureEvent xe = xev.get_xconfigure();
 805         /*
 806          * Correct window location which could be wrong in some cases.
 807          * See getNewLocation() for the details.
 808          */
 809         Point newLocation = getNewLocation(xe, 0, 0);
 810         xe.set_x(newLocation.x);
 811         xe.set_y(newLocation.y);
 812         checkIfOnNewScreen(new Rectangle(xe.get_x(),
 813                                          xe.get_y(),
 814                                          xe.get_width(),
 815                                          xe.get_height()));
 816 
 817         // Don't call super until we've handled a screen change.  Otherwise
 818         // there could be a race condition in which a ComponentListener could
 819         // see the old screen.
 820         super.handleConfigureNotifyEvent(xev);
 821         AWTAccessor.getComponentAccessor().setLocation(target, newLocation.x,
 822                 newLocation.y);
 823         repositionSecurityWarning();
 824     }
 825 
 826     final void requestXFocus(long time) {
 827         requestXFocus(time, true);
 828     }
 829 
 830     final void requestXFocus() {
 831         requestXFocus(0, false);
 832     }
 833 
 834     /**
 835      * Requests focus to this top-level. Descendants should override to provide
 836      * implementations based on a class of top-level.
 837      */
 838     protected void requestXFocus(long time, boolean timeProvided) {
 839         // Since in XAWT focus is synthetic and all basic Windows are
 840         // override_redirect all we can do is check whether our parent
 841         // is active. If it is - we can freely synthesize focus transfer.
 842         // Luckily, this logic is already implemented in requestWindowFocus.


< prev index next >