Commit e16e01d
committed
refactor: move geometry/positioning to tray-app, distinct package, no screen fallback
Addresses the code-review findings on the module split.
- Move TrayScreenGeometry + all popup positioning (getTrayWindowPosition /
getTrayWindowPositionForInstance, corner detection, persistence) into
:tray-app, where the Tao backend is always present. The core artifact no
longer fabricates a 1920x1080 screen when no windowing backend is available:
the native tray managers just record the raw tray-icon click, and tray-app
resolves the corner + window position against real Tao geometry. macOS native
status-item queries are reached through typed MacTrayInitializer wrappers so
the JNI bridge stays internal.
- Move TrayApp/TrayAppState/TrayWindowDismissMode and friends to package
dev.nucleusframework.composenativetray.trayapp so no package is split across
the two published JARs (unblocks JPMS module-path consumers).
- tray-app: declare nucleus.application as api (it is TrayApp's receiver type).
- Align the tray-app log timestamp format with the core formatter.
- README: document the trayapp package and that getTrayWindowPosition lives in
composenativetray-app; getTrayPosition stays in core.
Consequence: getTrayPosition() on Linux, when used without composenativetray-app,
returns the desktop-environment default corner instead of a click-derived one.1 parent c212612 commit e16e01d
16 files changed
Lines changed: 547 additions & 654 deletions
File tree
- demo/src/jvmMain/kotlin/dev/nucleusframework/composenativetray/demo
- src/jvmMain/kotlin/dev/nucleusframework/composenativetray
- lib
- linux
- windows
- tray/impl
- utils
- tray-app
- src/jvmMain/kotlin/dev/nucleusframework/composenativetray/trayapp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
| 466 | + | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
| 469 | + | |
480 | 470 | | |
481 | 471 | | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
486 | 483 | | |
487 | | - | |
| 484 | + | |
| 485 | + | |
488 | 486 | | |
489 | 487 | | |
490 | 488 | | |
| |||
576 | 574 | | |
577 | 575 | | |
578 | 576 | | |
579 | | - | |
580 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| |||
demo/src/jvmMain/kotlin/dev/nucleusframework/composenativetray/demo/DemoAdaptivePositionWindows.kt
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
Lines changed: 3 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
254 | 252 | | |
255 | 253 | | |
256 | 254 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
277 | 258 | | |
278 | 259 | | |
279 | 260 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
21 | 48 | | |
22 | 49 | | |
23 | 50 | | |
| |||
0 commit comments