mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Linux: use X11 window manager events to move window and to show window menu (right-click on window title bar), if custom window decorations are enabled (issue #482)
This commit is contained in:
@@ -16,22 +16,19 @@
|
||||
|
||||
plugins {
|
||||
`cpp-library`
|
||||
`flatlaf-cpp-library`
|
||||
`flatlaf-jni-headers`
|
||||
}
|
||||
|
||||
flatlafJniHeaders {
|
||||
headers = listOf(
|
||||
"com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder.h",
|
||||
"com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder_WndProc.h"
|
||||
)
|
||||
}
|
||||
|
||||
library {
|
||||
targetMachines.set( listOf( machines.windows.x86, machines.windows.x86_64 ) )
|
||||
|
||||
// disable debuggable for release builds to make shared libraries smaller
|
||||
binaries.configureEach( CppSharedLibrary::class ) {
|
||||
with( compileTask.get() ) {
|
||||
if( name.contains( "Release" ) )
|
||||
isDebuggable = false
|
||||
}
|
||||
with( linkTask.get() ) {
|
||||
if( name.contains( "Release" ) )
|
||||
debuggable.set( false )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var javaHome = System.getProperty( "java.home" )
|
||||
@@ -43,36 +40,15 @@ tasks {
|
||||
group = "build"
|
||||
description = "Builds natives"
|
||||
|
||||
dependsOn( "linkReleaseX86", "linkReleaseX86-64" )
|
||||
if( org.gradle.internal.os.OperatingSystem.current().isWindows() )
|
||||
dependsOn( "linkReleaseX86", "linkReleaseX86-64" )
|
||||
}
|
||||
|
||||
withType<CppCompile>().configureEach {
|
||||
onlyIf { name.contains( "Release" ) }
|
||||
|
||||
// depend on :flatlaf-core:compileJava because it generates the JNI headers
|
||||
dependsOn( ":flatlaf-core:compileJava" )
|
||||
|
||||
doFirst {
|
||||
println( "Used Tool Chain:" )
|
||||
println( " - ${toolChain.get()}" )
|
||||
println( "Available Tool Chains:" )
|
||||
toolChains.forEach {
|
||||
println( " - $it" )
|
||||
}
|
||||
|
||||
// copy needed JNI headers
|
||||
copy {
|
||||
from( project( ":flatlaf-core" ).buildDir.resolve( "generated/jni-headers" ) )
|
||||
into( "src/main/headers" )
|
||||
include(
|
||||
"com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder.h",
|
||||
"com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder_WndProc.h"
|
||||
)
|
||||
filter<org.apache.tools.ant.filters.FixCrLfFilter>(
|
||||
"eol" to org.apache.tools.ant.filters.FixCrLfFilter.CrLf.newInstance( "lf" )
|
||||
)
|
||||
}
|
||||
}
|
||||
// generate and copy needed JNI headers
|
||||
dependsOn( "jni-headers" )
|
||||
|
||||
includes.from(
|
||||
"${javaHome}/include",
|
||||
|
||||
Reference in New Issue
Block a user