mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Native window decorations: fixed missing animations when minimizing, maximizing or restoring a window using window title bar buttons (issue #282)
This commit is contained in:
@@ -183,6 +183,16 @@ public class FlatWindowsNativeWindowBorder
|
||||
wndProc.appIconBounds = (appIconBounds != null) ? new Rectangle( appIconBounds ) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showWindow( Window window, int cmd ) {
|
||||
WndProc wndProc = windowsMap.get( window );
|
||||
if( wndProc == null )
|
||||
return false;
|
||||
|
||||
User32.INSTANCE.ShowWindow( wndProc.hwnd, cmd );
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColorizationColorAffectsBorders() {
|
||||
updateColorization();
|
||||
|
||||
@@ -45,6 +45,13 @@ JNIEXPORT void JNICALL Java_com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder
|
||||
FlatWndProc::uninstall( env, obj, reinterpret_cast<HWND>( hwnd ) );
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL Java_com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder_00024WndProc_showWindow
|
||||
( JNIEnv *env, jobject obj, jlong hwnd, jint cmd )
|
||||
{
|
||||
::ShowWindow( reinterpret_cast<HWND>( hwnd ), cmd );
|
||||
}
|
||||
|
||||
//---- class FlatWndProc fields -----------------------------------------------
|
||||
|
||||
int FlatWndProc::initialized = 0;
|
||||
|
||||
@@ -31,6 +31,14 @@ JNIEXPORT jlong JNICALL Java_com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorde
|
||||
JNIEXPORT void JNICALL Java_com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder_00024WndProc_uninstallImpl
|
||||
(JNIEnv *, jobject, jlong);
|
||||
|
||||
/*
|
||||
* Class: com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder_WndProc
|
||||
* Method: showWindow
|
||||
* Signature: (JI)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder_00024WndProc_showWindow
|
||||
(JNIEnv *, jobject, jlong, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user