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