mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
fixed crash when running in Webswing (issue #290)
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
FlatLaf Change Log
|
||||
==================
|
||||
|
||||
## 1.2-SNAPSHOT
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
- Fixed crash when running in Webswing. (issue #290)
|
||||
|
||||
|
||||
## 1.1.1
|
||||
|
||||
#### New features and improvements
|
||||
|
||||
@@ -157,7 +157,7 @@ public abstract class FlatLaf
|
||||
*/
|
||||
@Override
|
||||
public boolean getSupportsWindowDecorations() {
|
||||
if( SystemInfo.isProjector || SystemInfo.isWinPE )
|
||||
if( SystemInfo.isProjector || SystemInfo.isWebswing || SystemInfo.isWinPE )
|
||||
return false;
|
||||
|
||||
if( SystemInfo.isWindows_10_orLater &&
|
||||
|
||||
@@ -242,8 +242,8 @@ public class FlatNativeWindowBorder
|
||||
if( !SystemInfo.isWindows_10_orLater )
|
||||
return;
|
||||
|
||||
// do not use when running in JetBrains Projector or WinPE
|
||||
if( SystemInfo.isProjector || SystemInfo.isWinPE )
|
||||
// do not use when running in JetBrains Projector, Webswing or WinPE
|
||||
if( SystemInfo.isProjector || SystemInfo.isWebswing || SystemInfo.isWinPE )
|
||||
return;
|
||||
|
||||
// check whether disabled via system property
|
||||
|
||||
@@ -70,7 +70,7 @@ public class FlatPopupFactory
|
||||
|
||||
boolean forceHeavyWeight = isOptionEnabled( owner, contents, FlatClientProperties.POPUP_FORCE_HEAVY_WEIGHT, "Popup.forceHeavyWeight" );
|
||||
|
||||
if( !isOptionEnabled( owner, contents, FlatClientProperties.POPUP_DROP_SHADOW_PAINTED, "Popup.dropShadowPainted" ) || SystemInfo.isProjector )
|
||||
if( !isOptionEnabled( owner, contents, FlatClientProperties.POPUP_DROP_SHADOW_PAINTED, "Popup.dropShadowPainted" ) || SystemInfo.isProjector || SystemInfo.isWebswing )
|
||||
return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight ), contents );
|
||||
|
||||
// macOS and Linux adds drop shadow to heavy weight popups
|
||||
|
||||
@@ -56,6 +56,7 @@ public class SystemInfo
|
||||
|
||||
// other
|
||||
/** @since 1.1 */ public static final boolean isProjector;
|
||||
/** @since 1.1.2 */ public static final boolean isWebswing;
|
||||
/** @since 1.1.1 */ public static final boolean isWinPE;
|
||||
|
||||
static {
|
||||
@@ -92,6 +93,7 @@ public class SystemInfo
|
||||
|
||||
// other
|
||||
isProjector = Boolean.getBoolean( "org.jetbrains.projector.server.enable" );
|
||||
isWebswing = (System.getProperty( "webswing.rootDir" ) != null);
|
||||
isWinPE = isWindows && "X:\\Windows\\System32".equalsIgnoreCase( System.getProperty( "user.dir" ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user