< prev index next >

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

Print this page




 760 
 761         int runningWM = XWM.getWMID();
 762         Point newLocation = targetBounds.getLocation();
 763         if (xe.get_send_event() || runningWM == XWM.NO_WM || XWM.isNonReparentingWM()) {
 764             // Location, Client size + insets
 765             newLocation = new Point(scaleDown(xe.get_x()) - leftInset,
 766                                     scaleDown(xe.get_y()) - topInset);
 767         } else {
 768             // ICCCM 4.1.5 states that a real ConfigureNotify will be sent when
 769             // a window is resized but the client can not tell if the window was
 770             // moved or not. The client should consider the position as unkown
 771             // and use TranslateCoordinates to find the actual position.
 772             //
 773             // TODO this should be the default for every case.
 774             switch (runningWM) {
 775                 case XWM.CDE_WM:
 776                 case XWM.MOTIF_WM:
 777                 case XWM.METACITY_WM:
 778                 case XWM.MUTTER_WM:
 779                 case XWM.SAWFISH_WM:

 780                 {
 781                     Point xlocation = queryXLocation();
 782                     if (log.isLoggable(PlatformLogger.Level.FINE)) {
 783                         log.fine("New X location: {0}", xlocation);
 784                     }
 785                     if (xlocation != null) {
 786                         newLocation = xlocation;
 787                     }
 788                     break;
 789                 }
 790                 default:
 791                     break;
 792             }
 793         }
 794         return newLocation;
 795     }
 796 
 797     /*
 798      * Overridden to check if we need to update our GraphicsDevice/Config
 799      * Added for 4934052.




 760 
 761         int runningWM = XWM.getWMID();
 762         Point newLocation = targetBounds.getLocation();
 763         if (xe.get_send_event() || runningWM == XWM.NO_WM || XWM.isNonReparentingWM()) {
 764             // Location, Client size + insets
 765             newLocation = new Point(scaleDown(xe.get_x()) - leftInset,
 766                                     scaleDown(xe.get_y()) - topInset);
 767         } else {
 768             // ICCCM 4.1.5 states that a real ConfigureNotify will be sent when
 769             // a window is resized but the client can not tell if the window was
 770             // moved or not. The client should consider the position as unkown
 771             // and use TranslateCoordinates to find the actual position.
 772             //
 773             // TODO this should be the default for every case.
 774             switch (runningWM) {
 775                 case XWM.CDE_WM:
 776                 case XWM.MOTIF_WM:
 777                 case XWM.METACITY_WM:
 778                 case XWM.MUTTER_WM:
 779                 case XWM.SAWFISH_WM:
 780                 case XWM.UNITY_COMPIZ_WM:
 781                 {
 782                     Point xlocation = queryXLocation();
 783                     if (log.isLoggable(PlatformLogger.Level.FINE)) {
 784                         log.fine("New X location: {0}", xlocation);
 785                     }
 786                     if (xlocation != null) {
 787                         newLocation = xlocation;
 788                     }
 789                     break;
 790                 }
 791                 default:
 792                     break;
 793             }
 794         }
 795         return newLocation;
 796     }
 797 
 798     /*
 799      * Overridden to check if we need to update our GraphicsDevice/Config
 800      * Added for 4934052.


< prev index next >