1343 } 1344 } 1345 } 1346 } 1347 1348 HashMap<Class<?>, Insets> storedInsets = new HashMap<>(); 1349 Insets guessInsets(XDecoratedPeer window) { 1350 Insets res = storedInsets.get(window.getClass()); 1351 if (res == null) { 1352 switch (WMID) { 1353 case ENLIGHTEN_WM: 1354 res = new Insets(19, 4, 4, 4); 1355 break; 1356 case CDE_WM: 1357 res = new Insets(28, 6, 6, 6); 1358 break; 1359 case NO_WM: 1360 case LG3D_WM: 1361 res = zeroInsets; 1362 break; 1363 case MOTIF_WM: 1364 case OPENLOOK_WM: 1365 default: 1366 res = defaultInsets; 1367 } 1368 } 1369 if (insLog.isLoggable(PlatformLogger.Level.FINEST)) { 1370 insLog.finest("WM guessed insets: " + res); 1371 } 1372 return res; 1373 } 1374 /* 1375 * Some buggy WMs ignore window gravity when processing 1376 * ConfigureRequest and position window as if the gravity is Static. 1377 * We work around this in MWindowPeer.pReshape(). 1378 * 1379 * Starting with 1.5 we have introduced an Environment variable 1380 * _JAVA_AWT_WM_STATIC_GRAVITY that can be set to indicate to Java 1381 * explicitly that the WM has this behaviour, example is FVWM. 1382 */ | 1343 } 1344 } 1345 } 1346 } 1347 1348 HashMap<Class<?>, Insets> storedInsets = new HashMap<>(); 1349 Insets guessInsets(XDecoratedPeer window) { 1350 Insets res = storedInsets.get(window.getClass()); 1351 if (res == null) { 1352 switch (WMID) { 1353 case ENLIGHTEN_WM: 1354 res = new Insets(19, 4, 4, 4); 1355 break; 1356 case CDE_WM: 1357 res = new Insets(28, 6, 6, 6); 1358 break; 1359 case NO_WM: 1360 case LG3D_WM: 1361 res = zeroInsets; 1362 break; 1363 case UNITY_COMPIZ_WM: 1364 res = new Insets(35, 1, 1, 1); 1365 break; 1366 case MOTIF_WM: 1367 case OPENLOOK_WM: 1368 default: 1369 res = defaultInsets; 1370 } 1371 } 1372 if (insLog.isLoggable(PlatformLogger.Level.FINEST)) { 1373 insLog.finest("WM guessed insets: " + res); 1374 } 1375 return res; 1376 } 1377 /* 1378 * Some buggy WMs ignore window gravity when processing 1379 * ConfigureRequest and position window as if the gravity is Static. 1380 * We work around this in MWindowPeer.pReshape(). 1381 * 1382 * Starting with 1.5 we have introduced an Environment variable 1383 * _JAVA_AWT_WM_STATIC_GRAVITY that can be set to indicate to Java 1384 * explicitly that the WM has this behaviour, example is FVWM. 1385 */ |