File tree 1 file changed +5
-6
lines changed
src/java.desktop/unix/classes/sun/awt/X11
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1244,15 +1244,14 @@ private Insets getScreenInsetsImpl(final GraphicsConfiguration gc) {
1244
1244
if (np == null || !(gd instanceof X11GraphicsDevice ) || !np .active ()) {
1245
1245
return super .getScreenInsets (gc );
1246
1246
}
1247
+ final GraphicsDevice [] devices = ((X11GraphicsEnvironment )GraphicsEnvironment .
1248
+ getLocalGraphicsEnvironment ()).getScreenDevices ();
1249
+ if (localEnv .runningXinerama () && devices .length > 1 ) {
1250
+ return new Insets (0 , 0 , 0 , 0 );
1251
+ }
1247
1252
X11GraphicsDevice x11gd = (X11GraphicsDevice ) gd ;
1248
1253
int screenNum = x11gd .getScreen ();
1249
1254
Rectangle screen = gc .getBounds ();
1250
- boolean isFirstScreen = screen .x == 0 && screen .y == 0 ;
1251
- if (localEnv .runningXinerama () && !isFirstScreen ) {
1252
- // We cannot estimate insets for non-default screen,
1253
- // there are often none.
1254
- return new Insets (0 , 0 , 0 , 0 );
1255
- }
1256
1255
1257
1256
XToolkit .awtLock ();
1258
1257
try {
You can’t perform that action at this time.
0 commit comments