Skip to content

v0.1.0

Latest

Choose a tag to compare

@LionZXY LionZXY released this 02 Aug 23:39
· 4 commits to main since this release

First release.

Host Compose for Desktop content directly inside the Windows taskbar — not the tray, the taskbar
itself.

dependencies {
    implementation("uk.kulikov:compose-windows-taskbar:0.1.0")
}
fun main() = application {
    WindowsTaskBar {
        Text("Hello, taskbar")
    }
}

JNA's native stubs arrive transitively, so there is nothing to build, extract or unpack.

What's in it

  • WindowsTaskBar { }, following Compose's own Window / Tray idiom: declarative, recomposes
    live, and keeps application { } alive while composed.
  • Placement along the taskbar — BeforeTray (default), Start, AfterStart, AfterTaskList,
    Center, End, Absolute(dp) — resolved against live shell geometry.
  • Drag to move (on by default), click-through, per-display targeting, widget-level click and
    right-click callbacks.
  • Flyout for content that will not fit in the taskbar's few dozen pixels, and a context-menu DSL
    with checkboxes and submenus.
  • Recovery from explorer.exe restarts, taskbar moves, DPI changes and display changes.
  • TaskBarDiagnostics.report() for when the shell does something unexpected.
  • A graceful no-op on non-Windows, so multiplatform desktop apps keep building.

Known limits

Windows has no API for this, so the library reparents a window into Shell_TrayWnd. That means the
widget overlaps taskbar content rather than being laid out by it, and a Windows update can break the
technique — watch onStatusChanged. InjectionMode.Overlay avoids the cross-process SetParent at
the cost of z-order fights.

Verified on Windows 11 25H2 (build 26200) at 150% scaling. Multi-monitor, Windows 10, vertical
taskbars and auto-hide are implemented and unit-tested for their geometry but not yet exercised on
real hardware.