Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
262 commits
Select commit Hold shift + click to select a range
baa8e22
Linux: implement the window manager
shai-almog Aug 16, 2026
367e12e
macNative: implement the Catalyst window manager
shai-almog Aug 16, 2026
e4694af
Add the windowed screenshot suite
shai-almog Aug 16, 2026
5307d4b
Document desktop windows in the developer guide
shai-almog Aug 16, 2026
a264719
JavaSE: cover the per-canvas graphics resolution
shai-almog Aug 16, 2026
43a7798
macNative: fix three real defects in the Catalyst window layer
shai-almog Aug 16, 2026
28f8e10
Windows/Linux: fix defects found by compiling the native sources
shai-almog Aug 16, 2026
a9d54e0
macNative: implement window capture, and turn multi-window off by def…
shai-almog Aug 16, 2026
aa9bd7b
Correct the Catalyst orientation claim, and probe readiness by capturing
shai-almog Aug 16, 2026
1a2b320
Signal when a window has painted, and wait for it before capturing
shai-almog Aug 16, 2026
aa954cf
Record the Mac Catalyst verification result
shai-almog Aug 16, 2026
a776c4b
macNative: enable multi-window whenever Mac Catalyst is built
shai-almog Aug 17, 2026
5c168e8
Make a window come up at the size it asked for, and painted
shai-almog Aug 17, 2026
0403a60
Move the desktop windows guide snippets into the compiled demo sources
shai-almog Aug 17, 2026
ceca91e
macNative: recycle window scenes instead of destroying them
shai-almog Aug 17, 2026
338ee1a
Add the license header to the new guide snippet fixtures
shai-almog Aug 17, 2026
0ccdb37
Address the review of the desktop window work
shai-almog Aug 17, 2026
c9907fc
Cover the review fixes with tests
shai-almog Aug 17, 2026
13311a9
Document the difference between a close listener and Disposed
shai-almog Aug 17, 2026
1670ca0
macNative: keep the window raster matched to the window
shai-almog Aug 17, 2026
bea352c
Address the second review round
shai-almog Aug 17, 2026
c7832a8
Address the third review round
shai-almog Aug 17, 2026
bc45217
Address the fourth review round
shai-almog Aug 17, 2026
fc3370c
Address the fifth review round
shai-almog Aug 17, 2026
259c862
Address the sixth review round
shai-almog Aug 17, 2026
a128cc7
Address the seventh review round
shai-almog Aug 17, 2026
d20d070
Address the eighth review round
shai-almog Aug 17, 2026
c6b4990
Seed the native Windows window screenshot baselines
shai-almog Aug 17, 2026
aac8cba
Seed the native Linux window screenshot baselines
shai-almog Aug 17, 2026
47e0aa0
Satisfy the PMD gate for the desktop window work
shai-almog Aug 17, 2026
5acc488
Address the ninth review round
shai-almog Aug 17, 2026
f495477
macNative: do not lay a window out at a recycled scene's old size
shai-almog Aug 17, 2026
75ef76f
Keep the JavaSE port compiling at source 1.7
shai-almog Aug 17, 2026
9ac7ddd
Let the framework decide which windows are natively blocked
shai-almog Aug 17, 2026
34e0cb0
Bring the desktop windows guide up to date with the implementation
shai-almog Aug 17, 2026
b35b8bd
Report multi-window as skipped, not passed, where windows do not exist
shai-almog Aug 17, 2026
b7998b5
Paint a window over its whole surface, not the platform's stale size
shai-almog Aug 17, 2026
7383c44
Address the tenth review round
shai-almog Aug 18, 2026
aa3804f
Address the eleventh review round
shai-almog Aug 18, 2026
3636bd2
Address the twelfth review round
shai-almog Aug 18, 2026
047ce9e
Address the thirteenth review round
shai-almog Aug 18, 2026
e3bc655
Address the fourteenth review round
shai-almog Aug 18, 2026
cdd22a6
Address the fifteenth review round
shai-almog Aug 18, 2026
e54ef34
Address the sixteenth review round, and fix the Mac Catalyst build
shai-almog Aug 18, 2026
ba22f3e
Fix the GTK main-window buffer race, and the seventeenth review round
shai-almog Aug 18, 2026
f887d05
Stop a secondary Java SE canvas resizing the main surface
shai-almog Aug 18, 2026
bf6b675
Address the nineteenth review round
shai-almog Aug 18, 2026
da91e38
Address the twentieth review round
shai-almog Aug 18, 2026
11caf5c
Address the twenty-first review round
shai-almog Aug 18, 2026
6d88fca
Address the twenty-second review round
shai-almog Aug 18, 2026
f4f17c3
Add the missing copyright header to LinuxGenericPeer
shai-almog Aug 18, 2026
e287676
Address the twenty-third review round
shai-almog Aug 18, 2026
d60f7ba
Address the twenty-fourth review round
shai-almog Aug 18, 2026
8455642
Set the Linux browser's window slot before it is used
shai-almog Aug 18, 2026
e7c3392
Drop a pointless null guard in the browser create path
shai-almog Aug 18, 2026
0ac9cfc
Address the twenty-fifth review round
shai-almog Aug 18, 2026
5178ab7
Address the twenty-sixth review round
shai-almog Aug 18, 2026
bdded62
Address the twenty-seventh review round
shai-almog Aug 18, 2026
c742375
Address the twenty-eighth review round
shai-almog Aug 18, 2026
952656a
Address the twenty-ninth review round
shai-almog Aug 18, 2026
227e454
Address the thirtieth review round, and close some audited gaps
shai-almog Aug 18, 2026
56966f6
Address the thirty-first review round
shai-almog Aug 18, 2026
e38b87d
Address the thirty-second review round
shai-almog Aug 18, 2026
2dae938
Address the thirty-third review round
shai-almog Aug 18, 2026
a548633
Address the thirty-fourth review round, and fix a PMD violation
shai-almog Aug 18, 2026
1655610
Implement the Window animation-lock contract, and fix Checkstyle
shai-almog Aug 18, 2026
f0bee02
Address the thirty-sixth review round
shai-almog Aug 18, 2026
b2f98c5
Record a pointer press before dispatching it, and close two audited gaps
shai-almog Aug 18, 2026
591a275
Implement the Catalyst window controls it can express, document the rest
shai-almog Aug 18, 2026
eca52f5
Capture Catalyst pointer metadata, and release the Java SE gesture li…
shai-almog Aug 18, 2026
c2d7719
Address the fortieth review round
shai-almog Aug 18, 2026
0bfa9fd
Address the forty-first review round
shai-almog Aug 18, 2026
3ee10ea
Cancel pending input on every path that takes a window out of reach
shai-almog Aug 18, 2026
5707f6d
Cancel held input on focus loss, and reject input queued before a hide
shai-almog Aug 18, 2026
2a56bbf
Make native text editing work in windows on every desktop port
shai-almog Aug 18, 2026
14b81ab
Route the Catalyst native editor to its window, and fix one-shot timers
shai-almog Aug 18, 2026
0a9b553
Scale native peers for their own window's monitor
shai-almog Aug 18, 2026
5150bff
Keep pointer metadata with its packet, and fix two scale conversions
shai-almog Aug 18, 2026
588b2e0
Read Linux desktop windows back for real captures
shai-almog Aug 18, 2026
98f7259
Document what Window.capture() returns per platform
shai-almog Aug 18, 2026
7782fd1
Register animations through the top level, not the form
shai-almog Aug 18, 2026
08241f6
Explain at the call site why the Catalyst present copy stays
shai-almog Aug 18, 2026
f3915b3
Fix the guards around the migrated animation registrations
shai-almog Aug 18, 2026
7633e98
Reuse the coalesced drag's snapshot slot, and fix InfiniteProgress
shai-almog Aug 18, 2026
c04bb2c
Migrate the indirect form lookups the first sweep missed
shai-almog Aug 18, 2026
d059a79
Accept "readback" in the developer guide
shai-almog Aug 18, 2026
23ab118
Finish the getComponentForm sweep, and say where it stops
shai-almog Aug 18, 2026
de19aa6
Finish the local-variable form lookups
shai-almog Aug 18, 2026
c0a407b
Let text editing and peer pollers reach the port from a window
shai-almog Aug 18, 2026
8342617
Size the pointer metadata ring for both stacks, and make window comma…
shai-almog Aug 18, 2026
f3f0fe9
Dispatch window menu commands through the window, and keep MCP off it
shai-almog Aug 18, 2026
2c738b4
Stop double-animating in a window, and fix two more dead paths
shai-almog Aug 19, 2026
d9bb05b
Scope GTK modality to the owner, and check modality on the EDT
shai-almog Aug 19, 2026
965e2bb
Resolve JavaSE hit tests and editor focus from the canvas's own window
shai-almog Aug 19, 2026
e52eef5
Include the work area in the JavaSE monitor fingerprint
shai-almog Aug 19, 2026
47b0a0a
Route window text selection, button commands and emblem geometry corr…
shai-almog Aug 19, 2026
032ac61
Make toolbars, tabs, charts and selection scrolling work in a window
shai-almog Aug 19, 2026
bb63690
Keep secondary canvas resizes off the main surface
shai-almog Aug 19, 2026
c048191
Add the Mac Catalyst window goldens, and release the editor before te…
shai-almog Aug 19, 2026
6b5b66a
Add the missing licence header to UIManagerLargeTextScaleTest
shai-almog Aug 19, 2026
2b7fa9d
Complete the Mac Catalyst window goldens
shai-almog Aug 19, 2026
5068d80
Keep asking Catalyst for a window's geometry until it lands
shai-almog Aug 19, 2026
1582939
Converge Catalyst window geometry, and demand the size that was asked…
shai-almog Aug 19, 2026
35e4971
Measure Catalyst geometry against the right view, and rebalance the s…
shai-almog Aug 20, 2026
0608d58
Settle Catalyst window geometry before correcting it
shai-almog Aug 20, 2026
5d32086
Merge remote-tracking branch 'origin/master' into feat-desktop-windows
shai-almog Aug 20, 2026
6166944
Update to master, and fix three Catalyst and title defects from review
shai-almog Aug 20, 2026
96e792d
Re-assert a window's size while waiting, and fix three review findings
shai-almog Aug 20, 2026
15e1aa2
Keep a window's title when a toolbar is installed
shai-almog Aug 20, 2026
f3d7fad
Stop a dispatched packet's metadata from clobbering what a port stages
shai-almog Aug 20, 2026
db9dd19
Carry the Catalyst position flag, persist early moves, freeze at the …
shai-almog Aug 20, 2026
33184bb
Merge remote-tracking branch 'origin/master' into feat-desktop-windows
shai-almog Aug 20, 2026
cd34a65
Record real window-test statuses instead of not-run placeholders
shai-almog Aug 20, 2026
ffae129
Route pull-to-refresh, list commands and the search bar through the t…
shai-almog Aug 20, 2026
58760b3
Merge remote-tracking branch 'origin/master' into feat-desktop-windows
shai-almog Aug 21, 2026
bab62fe
Route toolbar side menus and JavaSE peer hit tests through the owning…
shai-almog Aug 21, 2026
1eac36a
Assert the gesture listener by identity, not by a VM-global count
shai-almog Aug 21, 2026
42688f0
Apply JavaSE window bounds before returning, and identify the canvas'…
shai-almog Aug 21, 2026
e5ad1c9
Invalidate the cached monitor when a window is moved
shai-almog Aug 21, 2026
e6c6150
Stop swallowing Win32 system keys, report real geometry, filter topol…
shai-almog Aug 21, 2026
a23ee14
Show an InteractionDialog on the window that asked for it
shai-almog Aug 21, 2026
f7ba295
Snapshot bounds before the peer is destroyed, size side menus to thei…
shai-almog Aug 21, 2026
6aa3338
Open a component popup in that component's window
shai-almog Aug 21, 2026
4c4326c
Keep a minimized window modal, and orient popups by their host
shai-almog Aug 21, 2026
bc7db89
Let a Picker work in a window, and inspect the canvas's own top level
shai-almog Aug 21, 2026
6f17f29
Make a picker in a window editable, dismissable and traversable
shai-almog Aug 21, 2026
3357775
Block Catalyst input under a modal, and show validation popups in the…
shai-almog Aug 21, 2026
b9fe219
Fix a Catalyst title use-after-free, the pre-scene origin, and emblem…
shai-almog Aug 21, 2026
14becd0
Write the Catalyst pending state under the slot lock
shai-almog Aug 21, 2026
d41fb91
Document InteractionDialog as window-aware instead of unsupported
shai-almog Aug 22, 2026
47d0308
Move the new guide snippets into tagged fixtures
shai-almog Aug 22, 2026
b45736f
Retain Catalyst scenes across dispatch, and stop leaking the reopened…
shai-almog Aug 22, 2026
684cbc1
Ignore failed monitor samples, and notice windows hidden with their o…
shai-almog Aug 22, 2026
b7dd06d
Retain the focus window, and report main-window bounds from every nat…
shai-almog Aug 22, 2026
6268dfe
Read Catalyst geometry on the main queue, and notice Win32 owner-driv…
shai-almog Aug 22, 2026
62273ca
Lock the Catalyst monitor read, and stop chrome changes reporting a m…
shai-almog Aug 22, 2026
10da3fc
Take Catalyst monitor answers on the main queue, and marshal geometry…
shai-almog Aug 22, 2026
0ca7189
Make window visibility non-droppable, and finish two of my own half-f…
shai-almog Aug 22, 2026
ae5ec0f
Marshal the location read, recurse the owned tree, traverse within th…
shai-almog Aug 22, 2026
4aa1b63
Stop losing queued resizes, and return a real snapshot from Catalyst …
shai-almog Aug 22, 2026
e527a61
Allocate window ids atomically, and correct what the guide promises a…
shai-almog Aug 22, 2026
3528acc
Convert native editor bounds to the owning canvas's scale
shai-almog Aug 22, 2026
029d614
Filter held-input timers by modality, report Catalyst minimize, drop …
shai-almog Aug 22, 2026
3a67e4e
Put Catalyst peers in their own window, and rehome an editor started …
shai-almog Aug 22, 2026
f6be48f
Replay Catalyst peers at scene adoption, and scale editors by their w…
shai-almog Aug 22, 2026
261b493
Replace the pending-peer queue, lock the editing slot, filter stale g…
shai-almog Aug 22, 2026
dc99f52
Coalesce window resizes, skip lightweight peers, cascade owner visibi…
shai-almog Aug 22, 2026
64dc18f
Keep Catalyst window focus out of the application lifecycle
shai-almog Aug 22, 2026
918c7e0
Keep owner-hidden bookkeeping honest on Catalyst
shai-almog Aug 22, 2026
2e100fe
Keep the main Catalyst scene out of global backgrounding
shai-almog Aug 22, 2026
bfd542a
Keep an owned Catalyst window hidden while its owner is away
shai-almog Aug 22, 2026
dd8dd6a
Restore a hidden owner instead of leaving its window pending
shai-almog Aug 22, 2026
17885fe
Restore an explicitly hidden owner through its own lifecycle
shai-almog Aug 22, 2026
3806c83
Restore a minimized owner too, and notify owners before descendants
shai-almog Aug 22, 2026
fe0f77e
Release a disposed JavaSE window's canvas graphics
shai-almog Aug 22, 2026
7b0c8cc
Clear the iconic state when showing a minimized window
shai-almog Aug 22, 2026
13d803d
Route Windows and Linux peers to their owning window
shai-almog Aug 22, 2026
53a0515
Add the missing copyright headers to two Windows port files
shai-almog Aug 22, 2026
c095b39
Drop a Catalyst slot whose scene activation failed
shai-almog Aug 22, 2026
64d6fcf
Guard Catalyst activation failures by generation, and retry on show
shai-almog Aug 22, 2026
d239c6d
Release modality when a Catalyst scene activation fails
shai-almog Aug 22, 2026
19d18c5
Blit a JavaSE window's raster with that window's scale
shai-almog Aug 22, 2026
afcc487
Reposition the JavaSE editor when its window changes monitor scale
shai-almog Aug 22, 2026
5d39450
Reposition the TextCompatMode editor on a scale change too
shai-almog Aug 22, 2026
bb923ec
Make the JavaSE hide synchronous, as show already was
shai-almog Aug 22, 2026
47ea5e7
Clear the Catalyst peer on activation failure, and document ComboBox
shai-almog Aug 22, 2026
c9b04d7
Stop built-ins throwing inside a Window, and correct two guide claims
shai-almog Aug 22, 2026
10f2b8b
Separate owner-hidden from minimized on Win32, and serialize the Cata…
shai-almog Aug 22, 2026
197b19b
Don't report a hidden Linux window as shown when its owner de-iconifies
shai-almog Aug 22, 2026
67f11e4
Track a Catalyst scene request from the moment it is made
shai-almog Aug 22, 2026
ab36503
Recompute JavaSE peer bounds when the owning scale changes
shai-almog Aug 22, 2026
c469048
Give Window the paint guard and elevation redirect Form already had
shai-almog Aug 22, 2026
80f5212
Delegate the rest of the scroll settings to the window's content pane
shai-almog Aug 22, 2026
c5ec425
Take the safe area from the enclosing window, not the main surface
shai-almog Aug 22, 2026
cd97658
Attach a window's native peers to its layered pane
shai-almog Aug 22, 2026
5126a16
Carry the failed Catalyst request token into Java
shai-almog Aug 22, 2026
b6c72e0
Give a window's content pane the Form defaults it was missing
shai-almog Aug 22, 2026
4072c7c
Delegate every content-pane operation a Form delegates
shai-almog Aug 22, 2026
24a28a6
Hold the WebKit view across a reparent, and clear stale JavaSE ownership
shai-almog Aug 22, 2026
2066077
Hold the Linux widget across teardown as well as reparent
shai-almog Aug 22, 2026
c401763
Let hosted Linux peers outlive the window that hosted them
shai-almog Aug 22, 2026
29c2864
Detach Windows peers before destroying their host window
shai-almog Aug 22, 2026
7f5a0bf
Drop a wheel gesture whose window was hidden during dispatch
shai-almog Aug 22, 2026
064d672
Take a failed Catalyst owner's windows down with it
shai-almog Aug 22, 2026
ade2e25
Match a Catalyst scene to the request that asked for it
shai-almog Aug 22, 2026
6a20198
Release a failed owner's modal children, and park stale Catalyst scenes
shai-almog Aug 22, 2026
aedc92e
Re-add a Linux browser whose slot number was reused
shai-almog Aug 22, 2026
0f6bf06
Remove CI artifacts committed by mistake
shai-almog Aug 22, 2026
3098245
Stop the JavaSE monitor poller when the port is torn down
shai-almog Aug 22, 2026
d889f6c
Cascade Linux window hides to the windows they own
shai-almog Aug 22, 2026
b3ae9f9
Use the lightweight picker inside a window
shai-almog Aug 22, 2026
1219510
Reject a simulator capture whose device screen has not painted
shai-almog Aug 22, 2026
2979f36
Revert the unpainted-screen guard: it broke the Windows tooling run
shai-almog Aug 22, 2026
ec71f68
Document every Catalyst system sheet, not just sharing
shai-almog Aug 22, 2026
b20ccbd
Keep window lifecycle events out of the lossy native rings
shai-almog Aug 22, 2026
9a06d78
Compare every Monitor property, not just index and bounds
shai-almog Aug 22, 2026
d6f6c6e
Make a plain FAB work in a window, as the guide already claimed
shai-almog Aug 22, 2026
1957d05
Repaint every top level when an image finishes decoding
shai-almog Aug 22, 2026
1194190
Emit the Catalyst scene manifest whenever windows are enabled
shai-almog Aug 22, 2026
96181de
Never evict one window's transition to make room for another's
shai-almog Aug 22, 2026
0a8f5c5
Never let a visibility change overwrite a queued close request
shai-almog Aug 22, 2026
c3fd7c2
Coalesce onto the newest queued transition, not the first found
shai-almog Aug 22, 2026
143f010
Stop a lifecycle event being dropped when the queue holds only lifecy…
shai-almog Aug 22, 2026
4f869e6
Tell the Linux window manager about visibility the platform changed i…
shai-almog Aug 22, 2026
bc98e38
Give windowHideNotify back its documentation
shai-almog Aug 22, 2026
aa519fd
Clip a native text editor to its own window, not to the main surface
shai-almog Aug 22, 2026
052aa92
Scope a popup's inferred host, and stop a missing window manager spin…
shai-almog Aug 22, 2026
b45b752
Add the CN.isMultiWindowSupported() shorthand the guide already docum…
shai-almog Aug 22, 2026
68e5458
Paint the window background when redrawing it under an overlay
shai-almog Aug 22, 2026
818792b
Keep a key repeat with its original window, and stop restore() revivi…
shai-almog Aug 22, 2026
6b30f2c
Ask for a new window when the platform refuses a window's size
shai-almog Aug 23, 2026
c141c0a
Check the values in a custom scene manifest, not just the key names
shai-almog Aug 23, 2026
8d01c0b
Report Hidden from dispose() only when it actually takes a window off…
shai-almog Aug 23, 2026
4536f80
Keep releases and focus changes when the native event queue overflows
shai-almog Aug 23, 2026
019bea3
Never drop the newest protected event, and leave a failed child for i…
shai-almog Aug 23, 2026
92990dc
Read a plist boolean as an element, not as a spelling
shai-almog Aug 23, 2026
459b58c
Deregister a switch animation from the top level that registered it
shai-almog Aug 23, 2026
d66b5ad
Add the copyright header SwitchTest was missing
shai-almog Aug 23, 2026
fd0f36e
Treat the scene manifest as a declared key, not as any mention of its…
shai-almog Aug 23, 2026
479345a
Skip past a whole comment when reading a plist value, not just its op…
shai-almog Aug 23, 2026
73866aa
Refuse a second main scene off Catalyst, and read the window role pas…
shai-almog Aug 23, 2026
862e4a3
Give up a termination before a lifecycle event when the queue cannot …
shai-almog Aug 23, 2026
de7460d
Apply an activation failure in the turn that validated it
shai-almog Aug 23, 2026
4340a81
Filter drag activation for window pointers, and share one live-text p…
shai-almog Aug 23, 2026
4a56c7a
Protect terminations in the framework's queue too, and keep the last …
shai-almog Aug 23, 2026
ed147fc
Apply the termination reserve to every path that fills the input stack
shai-almog Aug 23, 2026
c8e9004
Arm key timers only for a press that was accepted, and remember Image…
shai-almog Aug 23, 2026
3017bc9
Record the zoom host at every registration, and arm no long press for…
shai-almog Aug 23, 2026
567f037
Capture the registration host for the chart animations, finishing the…
shai-almog Aug 23, 2026
414903a
Simplify the drag threshold's final return for PMD
shai-almog Aug 23, 2026
7df8a63
Bind the scene delegate check to its key, not to where the name appears
shai-almog Aug 23, 2026
84b933c
Bound the window role by a declared key, not by the words SceneSessio…
shai-almog Aug 23, 2026
5eba8f5
Capture the registration host for the toolbar and caret animations
shai-almog Aug 23, 2026
a329fee
Parse plist key elements, and let Desktop answer before Display is in…
shai-almog Aug 23, 2026
962db47
Bound a scene role by its own array, not by what the next key is called
shai-almog Aug 23, 2026
eb4ca86
Match plist elements rather than literal tags
shai-almog Aug 23, 2026
78e6d90
Coalesce main-surface resizes, start monitor watching after init, cap…
shai-almog Aug 23, 2026
1ad4aca
Ask the manifest's own dictionary, not the whole injected fragment
shai-almog Aug 23, 2026
519efc3
Reuse the spinner animation, and skip commented tags when bounding a …
shai-almog Aug 23, 2026
540a283
Track drag activation per window rather than once for all of them
shai-almog Aug 23, 2026
be0898d
Bind a dialog timeout once the host it is shown on is known
shai-almog Aug 23, 2026
7e42e53
Merge remote-tracking branch 'origin/master' into feat-desktop-windows
shai-almog Aug 23, 2026
a2f952b
Build the JavaSE window manager once, even under a race
shai-almog Aug 23, 2026
10f6272
Scroll Linux windows with a touchpad, not just a wheel
shai-almog Aug 23, 2026
c1e1a76
Honour the outer-bounds contract on Linux and Mac Catalyst
shai-almog Aug 23, 2026
8c852f5
Track the pressed selection per window
shai-almog Aug 23, 2026
1c7a7cd
Capture the real Windows window raster instead of repainting it
shai-almog Aug 23, 2026
1c5ee65
Free the Catalyst window raster instead of waiting for a finalizer
shai-almog Aug 23, 2026
9f01f76
Give back a window's drag slot when it is disposed mid-press
shai-almog Aug 23, 2026
d5dc9c1
Match plist container tags structurally when scanning nesting
shai-almog Aug 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions CodenameOne/src/com/codename1/charts/ChartComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.codename1.charts.views.XYChart;
import com.codename1.ui.Component;
import com.codename1.ui.Display;
import com.codename1.ui.Form;
import com.codename1.ui.Graphics;
import com.codename1.ui.Transform;
import com.codename1.ui.animations.Animation;
Expand Down Expand Up @@ -992,6 +991,13 @@ private interface IZoomTransition {
}

private class ZoomTransition implements Animation, IZoomTransition {
/// The top level this transition registered on, so cleanup removes it from
/// that one rather than from wherever the chart resolves to when the motion
/// ends. A chart removed or reparented in between leaves the animation on the
/// original for good: its hasAnimations() stays true, the event dispatch thread
/// never sleeps, and the finished branch runs every frame.
private com.codename1.ui.TopLevelContainer animationHost;

private final Rectangle currentViewPort;
private final Rectangle newViewPort;
private final Transform origTransform;
Expand All @@ -1012,8 +1018,9 @@ private class ZoomTransition implements Animation, IZoomTransition {

@Override
public void start() {
Form f = ChartComponent.this.getComponentForm();
com.codename1.ui.TopLevelContainer f = ChartComponent.this.getTopLevelContainer();
if (f != null) {
animationHost = f;
f.registerAnimated(this);
this.motion.start();
} else {
Expand All @@ -1022,9 +1029,9 @@ public void start() {
}

public void cleanup() {
Form f = ChartComponent.this.getComponentForm();
if (f != null) {
f.deregisterAnimated(this);
if (animationHost != null) {
animationHost.deregisterAnimated(this);
animationHost = null;
}
}

Expand Down Expand Up @@ -1087,6 +1094,13 @@ public void paint(Graphics g) {
}

private class ZoomTransitionXY implements Animation, IZoomTransition {
/// The top level this transition registered on, so cleanup removes it from
/// that one rather than from wherever the chart resolves to when the motion
/// ends. A chart removed or reparented in between leaves the animation on the
/// original for good: its hasAnimations() stays true, the event dispatch thread
/// never sleeps, and the finished branch runs every frame.
private com.codename1.ui.TopLevelContainer animationHost;

private final BBox currentViewPort;
private final BBox newViewPort;
private final Motion motion;
Expand All @@ -1101,8 +1115,9 @@ private class ZoomTransitionXY implements Animation, IZoomTransition {

@Override
public void start() {
Form f = ChartComponent.this.getComponentForm();
com.codename1.ui.TopLevelContainer f = ChartComponent.this.getTopLevelContainer();
if (f != null) {
animationHost = f;
f.registerAnimated(this);
this.motion.start();
} else {
Expand All @@ -1111,9 +1126,9 @@ public void start() {
}

public void cleanup() {
Form f = ChartComponent.this.getComponentForm();
if (f != null) {
f.deregisterAnimated(this);
if (animationHost != null) {
animationHost.deregisterAnimated(this);
animationHost = null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
/// @author shannah
public abstract class SeriesTransition implements Animation {

/// The top level this transition registered on, so it is removed from that one
/// rather than from wherever the chart resolves to when the motion ends.
private com.codename1.ui.TopLevelContainer animationHost;


public static final int EASING_LINEAR = 1;
public static final int EASING_IN = 2;
Expand Down Expand Up @@ -119,7 +123,10 @@ protected void cleanup() {
public boolean animate() {
if (finished) {
cleanup();
chart.getComponentForm().deregisterAnimated(this);
if (animationHost != null) {
animationHost.deregisterAnimated(this);
animationHost = null;
}
return false;
} else if (motion.isFinished()) {
finished = true;
Expand Down Expand Up @@ -194,7 +201,13 @@ public void setEasing(int easing) {
/// current animation settings.
public void animateChart() {
initTransition();
chart.getComponentForm().registerAnimated(this);
// The chart's top level rather than its form: getComponentForm() is null by
// design inside a Window, so a chart transition threw there.
com.codename1.ui.TopLevelContainer top = chart.getTopLevelContainer();
if (top != null) {
animationHost = top;
top.registerAnimated(this);
Comment thread
shai-almog marked this conversation as resolved.
}

}

Expand Down
25 changes: 20 additions & 5 deletions CodenameOne/src/com/codename1/components/Ads.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.codename1.ui.Component;
import com.codename1.ui.Container;
import com.codename1.ui.Display;
import com.codename1.ui.Form;
import com.codename1.ui.Label;
import com.codename1.ui.TextArea;
import com.codename1.ui.TextField;
Expand All @@ -42,6 +41,7 @@
import com.codename1.ui.html.HTMLElement;
import com.codename1.ui.html.IOCallback;
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.TopLevelContainer;

import java.util.Vector;

Expand Down Expand Up @@ -127,7 +127,13 @@ public void actionPerformed(ActionEvent evt) {
});

if (refreshAd) {
getComponentForm().registerAnimated(this);
// The top level rather than the form: getComponentForm() is null
// by design inside a Window, so this both threw and left the
// animation unregistered there.
TopLevelContainer topLevel = getTopLevelContainer();
if (topLevel != null) {
topLevel.registerAnimated(this);
Comment thread
shai-almog marked this conversation as resolved.
}
} else {
requestAd();
}
Expand All @@ -138,7 +144,13 @@ public void actionPerformed(ActionEvent evt) {
@Override
protected void deinitialize() {
if (refreshAd) {
getComponentForm().deregisterAnimated(this);
// The top level rather than the form: getComponentForm() is null
// by design inside a Window, so this both threw and left the
// animation unregistered there.
TopLevelContainer topLevel = getTopLevelContainer();
if (topLevel != null) {
topLevel.deregisterAnimated(this);
}
}
}

Expand All @@ -150,8 +162,11 @@ private void requestAd() {
/// {@inheritDoc}
@Override
public boolean animate() {
Form parent = getComponentForm();
if (parent == null || !parent.isVisible()) {
// The top level's visibility rather than an enclosing Form's: getComponentForm()
// is null by design inside a Window, so this returned immediately there and the
// refresh the registration had just been fixed to enable never actually ran.
TopLevelContainer parent = getTopLevelContainer();
if (parent == null || !parent.asContainer().isVisible()) {
return false;
}
long t = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.codename1.ui.layouts.FlowLayout;
import com.codename1.ui.layouts.LayeredLayout;
import com.codename1.ui.util.EventDispatcher;
import com.codename1.ui.TopLevelContainer;

import java.io.IOException;

Expand Down Expand Up @@ -532,12 +533,24 @@ public void actionPerformed(ActionEvent evt) {
@Override
protected void initComponent() {
super.initComponent();
getComponentForm().registerAnimated(this);
// The top level rather than the form: getComponentForm() is null
// by design inside a Window, so this both threw and left the
// animation unregistered there.
TopLevelContainer topLevel = getTopLevelContainer();
if (topLevel != null) {
topLevel.registerAnimated(this);
}
}

@Override
protected void deinitialize() {
getComponentForm().deregisterAnimated(this);
// The top level rather than the form: getComponentForm() is null
// by design inside a Window, so this both threw and left the
// animation unregistered there.
TopLevelContainer topLevel = getTopLevelContainer();
if (topLevel != null) {
topLevel.deregisterAnimated(this);
}
super.deinitialize();
}

Expand Down
31 changes: 26 additions & 5 deletions CodenameOne/src/com/codename1/components/FloatingActionButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,11 @@ public Container bindFabToContainer(Component cnt, int orientation, int valign)
FlowLayout flow = new FlowLayout(orientation);
flow.setValign(valign);

Form f = cnt.getComponentForm();
if (f != null && (f.getContentPane() == cnt || f == cnt)) { //NOPMD CompareObjectsWithEquals
// The top level rather than the form: getComponentForm() is null by design in a
// Window, so binding to a window's content pane fell through to the wrapper
// below and returned it unattached -- the button simply never appeared.
com.codename1.ui.TopLevelContainer f = cnt.getTopLevelContainer();
if (f != null && (f.getContentPane() == cnt || f.asContainer() == cnt)) { //NOPMD CompareObjectsWithEquals
// special case for content pane installs the button directly on the content pane
Container layers = f.getLayeredPane(getClass(), true);
layers.setSafeArea(true);
Expand Down Expand Up @@ -386,9 +389,18 @@ public void setText(String text) {

@Override
protected void fireActionEvent(int x, int y) {
Form current = Display.getInstance().getCurrent();
if (current instanceof Dialog) {
((Dialog) current).dispose();
// This button's own top level, not the process-wide current form. A button in a
// secondary window would otherwise dispose a dialog showing on the main window
// -- activating a window does not change Display.getCurrent(), so the dialog it
// closed had nothing to do with the click.
com.codename1.ui.TopLevelContainer top = getTopLevelContainer();
if (top instanceof Dialog) {
((Dialog) top).dispose();
} else if (top == null || top instanceof Form) {
Form current = Display.getInstance().getCurrent();
if (current instanceof Dialog) {
((Dialog) current).dispose();
}
}
super.fireActionEvent(x, y);
}
Expand All @@ -404,6 +416,15 @@ public void released(int x, int y) {
}
//if this fab has sub fab's display them
if (subMenu != null) {
// The submenu is shown in a Dialog, which is not top-level-aware: inside a
// Window getComponentForm() is null by design, and the tint calls below
// dereferenced it without checking, so releasing a sub-menu FAB in a window
// threw out of the button press. There is nothing to show there until
// Dialog itself becomes window-aware, but a standard component must not
// throw to say so -- see the unsupported list in the desktop windows guide.
if (getComponentForm() == null) {
return;
}
final Container con = createPopupContent(subMenu);
Dialog d = new Dialog();
d.setDialogUIID("Container");
Expand Down
42 changes: 35 additions & 7 deletions CodenameOne/src/com/codename1/components/FloatingHint.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import com.codename1.ui.events.FocusListener;
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.layouts.LayeredLayout;
import com.codename1.ui.TopLevelContainer;
import com.codename1.ui.Window;

/// A floating hint is similar to a text field with a hint. However, when the text field has text in it the hint appears
/// above the text field instead including an animation when focus hits the text field see
Expand Down Expand Up @@ -107,17 +109,27 @@ public void focusLost(Component cmp) {
tf.addFocusListener(fl);
}

/// Revalidates the surface a component lives in, whether that is a form or a
/// window.
private static void revalidateTopLevel(Component c) {
TopLevelContainer top = c.getTopLevelContainer();
if (top != null) {
top.asContainer().revalidate();
}
}

private void focusGainedImpl() {
if (isInitializedImpl()) {
hintButton.setFocus(true);
if (!hintButton.isVisible()) {
hintButton.setVisible(true);
if (getComponentForm().grabAnimationLock()) {
TopLevelContainer top = getTopLevelContainer();
if (top != null && top.grabAnimationLock()) {
morphAndWait(hintLabel, hintButton, 150);
getComponentForm().releaseAnimationLock();
top.releaseAnimationLock();
}
hintLabel.setVisible(false);
tf.getComponentForm().revalidate();
revalidateTopLevel(tf);
tf.setEditable(true);
tf.startEditingAsync();
} else {
Expand All @@ -132,21 +144,37 @@ private void focusGainedImpl() {
}
}

/// True when this hint is attached to the surface currently on screen.
///
/// Comparing `Display#getCurrent()` -- which only ever names a `Form` -- against
/// `getComponentForm()`, null inside a `Window`, was false for every floating hint
/// in a window, so the animated hint silently degraded to the plain branch there.
private boolean isInitializedImpl() {
return isInitialized() && getComponentForm() == Display.getInstance().getCurrent(); //NOPMD CompareObjectsWithEquals
if (!isInitialized()) {
return false;
}
TopLevelContainer top = getTopLevelContainer();
if (top == null) {
return false;
}
if (top instanceof Window) {
return ((Window) top).isWindowShowing();
}
return Display.getInstance().getCurrent() == top; //NOPMD CompareObjectsWithEquals
}

private void focusLostImpl() {
if (isInitializedImpl()) {
hintButton.setFocus(false);
if (tf.getText().length() == 0) {
hintLabel.setVisible(true);
if (getComponentForm().grabAnimationLock()) {
TopLevelContainer top = getTopLevelContainer();
if (top != null && top.grabAnimationLock()) {
morphAndWait(hintButton, hintLabel, 150);
getComponentForm().releaseAnimationLock();
top.releaseAnimationLock();
}
hintButton.setVisible(false);
tf.getComponentForm().revalidate();
revalidateTopLevel(tf);
revalidate();
tf.setEditable(false);
}
Expand Down
Loading
Loading