Draft
Conversation
Add a new decorated-window-jni module that reproduces the JBR CustomTitleBar API using pure JNI on macOS, removing the dependency on JetBrains Runtime. macOS native implementation (JniMacTitleBar.m): - Custom title bar height via NSAutoLayout constraints - Traffic light button repositioning with shrink factor - Native drag view (NucleusDragView) mirroring JBR's AWTWindowDragView with performWindowDragWithEvent: for proper window snapping/tiling - Fullscreen handling: NSNotification observer + replacement buttons anchored in contentView (mirrors JBR's setWindowFullScreenControls) - _adjustWindowToScreen swizzle for window tiling near screen edges - Zoom button tracking area for macOS 15 tiling support - Double-click on title bar for zoom/minimize (system preference) Kotlin JNI bridge: - JniMacTitleBarBridge: native library loading from system path or JAR - JniMacWindowUtil: NSWindow pointer extraction via AWT reflection - Platform-specific TitleBar implementations for macOS, Linux, Windows
…o decorated-window-jbr Create a new shared `decorated-window-core` module containing 70% of duplicated code between JBR and JNI variants. Both variants now depend on core via `api()` for shared types, layout logic, styling, resources, and composable bodies (DecoratedWindowBody, DecoratedDialogBody). - Extract shared: DecoratedWindowCore, DecoratedDialogCore, TitleBarCore, DialogTitleBar, TitleBarLinuxCommon, styling, internal utilities, and Linux SVG icons - Rename `decorated-window` → `decorated-window-jbr` with JBR-specific implementations only - Update `decorated-window-jni` to trim shared code and depend on core - Update `decorated-window-material` to compile against `decorated-window-jbr` (which transitively exposes core via api dependency) - Update `settings.gradle.kts` to include `:decorated-window-core` and rename `:decorated-window` - Add platform-specific `DialogTitleBar()` dispatchers to each variant All modules compile successfully. ktlint clean, detekt skipped (pre-existing JDK 25 compatibility issue unrelated to this change).
Move title bar double-click handling from native mouseUp to Compose layer using PointerEventPass.Final. This ensures interactive components (buttons) consume the event first, preventing false zoom triggers. Respects system AppleActionOnDoubleClick preference via new JNI method. Also rename DialogTitleBar.kt to DialogTitleBarImpl.kt in decorated-window-core to avoid class name collision with decorated-window-jni.
Add a complete Jewel standalone sample module featuring: - Showcase components (buttons, checkboxes, dropdowns, etc.) - Markdown editor with preview - Theme switching (Light, Dark, LightWithLightHeader, System) - Jewel + nucleus decorated window integration - macOS JVM module opens configuration
…jewel-sample - Add no-op stub for removed `java.awt.Cursor.finalizeImpl()` to satisfy `libawt.dylib` references on macOS. - Include `Info.plist` with macOS bundle metadata for JewelSample. - Add native-image config files (`jni-config.json`, `proxy-config.json`, `reachability-metadata.json`) to support GraalVM compilation on macOS and Linux.
- Add new types for GraalVM native-image support (e.g., `coil3`, `com.apple.eawt.FullScreenHandler`). - Remove unused types and resources to optimize native config. - Include additional SVG and font resources for expanded UI capabilities.
…packaging tasks - Introduce `configureGraalvmApplication` for end-to-end native image builds. - Add platform-specific packaging tasks for native binaries: - macOS: `.app` bundle with codesigning, dynamic libraries, and Info.plist generation. - Linux: binary packaging with `.so` libraries and RPATH fixes. - Windows: `.exe` packaging with icons, version info, and `.dll` dependencies. - Include Electron Builder integration for cross-platform distribution.
…cOS packaging - Introduce task to unpack default resources (icons, entitlements) for GraalVM builds. - Implement fallback to default macOS icon when no custom icon is provided. - Integrate default resource unpacking into macOS `.app` bundle creation and Electron Builder packaging flow. - Refactor Info.plist generation to ensure icon is always included.
- Add `proguard-rules.pro` to configure class preservation and avoid runtime crashes in release builds. - Enable ProGuard with version `7.8.1` for the `release` build type, with shrinking and obfuscation disabled. - Set maximum compression level for native distributions. - Update `configureDesktop` and `configureGraalvmApplication` to respect build type classifiers. - Exclude unnecessary metadata from JAR packaging for cleaner release artifacts.
Simplified code by removing the layout direction toggle functionality, associated icons, and redundant imports. Updated `ImageVector.Builder` formatting in `TablerTextDirectionLtr` and `TablerTextDirectionRtl`.
Introduced Windows-standard close button hover and pressed colors, applied conditionally based on the platform. Retains existing colors for non-Windows platforms.
…aalVM compatibility Added support for GraalVM native image builds, including platform-specific native-image configurations and early initialization fixes for charset and fontmanager subsystems. Integrated new fonts, icons, and other assets into the build. Disabled ProGuard optimizations in favor of GraalVM arguments for efficient native compilation.
Added support for external native-image configuration directories to improve handling of reflection/JNI/resource metadata. Included `javaaccessbridge.dll` in resource filters for Windows builds.
…s 11 dialogs Introduced `nativeApplyDialogStyle` to apply rounded corners and DWM shadow for undecorated popup dialog windows on Windows 11 (22000+). Integrated functionality into `DialogTitleBar.Windows`. Safely no-ops on older Windows versions.
Adjusted `titlePaneCloseButtonPressedBackground` to use a darker red shade (#FFB71119) for consistency across themes.
Aligned `titlePaneCloseButtonPressedBackground` with a new blue shade (#FF2596BE) to enhance visual consistency across themes.
…feat/decorated-window-jni
…macOS behavior)" This reverts commit 633666e.
Customize the decorated window and title bar colors to use Jewel theme colors instead of hardcoded platform defaults. The window now matches the current Jewel theme (panel background, borders, text color) and reacts to theme switches.
…utable name Add native JNI bridge for Linux window decorations (title bar drag, dialog support) and fix electron-builder Linux config not receiving executableName, which caused the .deb postinst and .desktop to reference a wrong binary path.
- Add new types (`sun.awt.AWTAccessor` and `sun.awt.AWTAccessor$ComponentAccessor`) with JNI-accessible methods for improved compatibility. - Include `getDisplay` method support in `sun.awt.SunHints`. - Fix resource glob order in the native configuration for better packaging consistency.
…sources - Add new types (e.g., `coil3.RealImageLoader`, `coil3.network.ktor3.internal.KtorNetworkFetcherServiceLoaderTarget`, `sun.security.provider.SHA2$SHA256`) for expanded native image compatibility. - Include more font, icon, and SVG resources to support additional UI elements. - Update resource glob patterns for enhanced packaging accuracy.
Removed unused reflection entries and replaced/update icons, fonts, and other resources in the native-image configuration to enhance GraalVM compatibility and ensure platform-specific asset inclusion.
Implemented GraalVM native-image substitutions for Font.createFont and Win32FontManager.getFontPath to address resource stream handling and platform encoding issues. Updated fonts, reachability metadata, and configuration for improved native-image compatibility on Windows and non-JBR JVMs.
…ity metadata Introduced `IsWindows` build-time condition and applied Windows-specific substitutions for `Font.createFont` and `Win32FontManager`. Updated reachability metadata by removing unused entries to enhance GraalVM native-image compatibility.
…reens - Use `XQueryPointer` to obtain unscaled physical root-window coordinates required by `_NET_WM_MOVERESIZE`. - Fallback to logical (scaled) coordinates when `XQueryPointer` fails.
- Replace redundant `Area` construction with a single `RoundRectangle2D.Float` assignment. - Streamline `RoundedCornerShape` creation for Gnome environment.
- Introduce `linux-hidpi` module for native HiDPI scale factor detection on Linux (GSettings, GDK_SCALE, Xft.dpi). - Add JNI bridge (`nucleus_linux_hidpi_jni`) for efficient native scale retrieval. - Integrate with `example` app to apply detected scale factor before AWT initialization. - Update reachability metadata and dependencies for GraalVM compatibility.
Generated and included a DPI-aware application manifest in Windows GraalVM native-image configurations to improve HiDPI handling. Updated resource compilation to embed the manifest in the executable. Documented Windows HiDPI behavior in code comments.
Standardized hover and press states for title bar buttons, using platform-specific colors (Windows, KDE, GNOME). Removed unused color constants and error field to streamline the MaterialColorMapping logic.
Dropped hover and press state colors for title bar buttons, replacing them with hardcoded platform-specific implementations. Updated docs and streamlined related styling logic.
…irection handling Added functionality for merging agent-generated GraalVM native-image configurations into existing ones while preserving manual enrichments. Updated title bar layout direction to detect and adapt based on JVM locale for RTL support. Improved title bar measurement logic for consistent alignment.
- Remove `Cursor.finalizeImpl` native stub as it is no longer required. - Add extensive macOS reachability metadata required for GraalVM native-image compatibility.
- Ensure `sourcesJar` includes dependencies from `buildNativeMacOs` by configuring task relationships.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
decorated-window-jnimodule as a JBR-free alternative custom title bar and window decorationJniMacTitleBar.m) handles traffic light repositioning, fullscreen transitions, window snapping/tiling via_adjustWindowToScreenswizzle, and native drag viaNucleusDragViewJniMacTitleBarBridge) with embedded dylib extraction from JAR resourcesaarch64andx64architectures with pre-built dylibsKey features
performWindowDragWithEvent:(supports macOS window snapping/tiling)Test plan