Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bada5bf
Fix native editor windowing, text input, and MCP dialog automation
shai-almog Oct 14, 2026
4b4657f
Add framework license header to geometry regression test
shai-almog Oct 14, 2026
13d84a7
Format text input geometry to satisfy framework style checks
shai-almog Oct 14, 2026
5da7232
Fix native text geometry cost, refresh, and keyboard layout
shai-almog Oct 14, 2026
5f96845
Serialize native editor commands and bound keyboard geometry updates
shai-almog Oct 14, 2026
9e03a7a
Fix picker ownership, window keyboard layout, and semantic UI actions
shai-almog Oct 14, 2026
c4b7d25
Integrate native desktop title content on Windows and Linux
shai-almog Oct 14, 2026
b3b0474
Preserve GTK title control releases outside their bounds
shai-almog Oct 14, 2026
a434ace
Resolve MCP and text geometry PMD findings
shai-almog Oct 14, 2026
51a9598
Isolate backend runtime resources from concurrent translators
shai-almog Oct 14, 2026
6094645
Keep dialog timeout disposal on EDT and avoid deprecated UTI constant
shai-almog Oct 15, 2026
b74dc08
Preserve title padding units and relayout stopped keyboard owners
shai-almog Oct 15, 2026
ba1172c
Clear native title chrome activated before the first toolbar paint
shai-almog Oct 15, 2026
8f3119a
Preserve title control input, sheet modality, and native peer geometry
shai-almog Oct 15, 2026
6fb699c
Publish native text geometry with its shadow state and refresh title …
shai-almog Oct 15, 2026
89076db
Recalibrate Windows string memory from three matching CPU runs
shai-almog Oct 15, 2026
b8acc0c
Wait for Playground run completion before the next browser edit
shai-almog Oct 15, 2026
bed59be
Fix desktop title touch routing and display metric refresh
shai-almog Oct 15, 2026
4c7e35e
Refresh Windows DWM title margin when monitor DPI changes
shai-almog Oct 15, 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
4 changes: 2 additions & 2 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# while Ant's own <get retries> was still inside the outage. NOT added to
# the test step below, where retrying a network-dependent test would
# launder exactly the flake this repository requires to be root-caused.
RETRY_ONLY_MATCHING: 'status( code)?: (403|429|50[0-9])|Could not transfer artifact|Failed to read artifact descriptor|Unresolveable build extension|Non-resolvable import POM|Could not collect dependencies|UnknownHostException|Unknown host|Connection timed out|Connection reset|Premature end of Content-Length|Error getting https'
RETRY_ONLY_MATCHING: 'status( code)?: (403|429|50[0-9])|Could not transfer artifact|Failed to read artifact descriptor|Unresolveable build extension|Non-resolvable import POM|Could not collect dependencies|Could not resolve dependencies|UnknownHostException|Unknown host|Connection timed out|Connection reset|Premature end of Content-Length|Error getting https'
run: |
# The cn1{app,lib}-archetype modules are part of the maven/ reactor,
# so this single install also stages them into the local repo.
Expand All @@ -79,7 +79,7 @@ jobs:

- name: Refresh archetype catalog
env:
RETRY_ONLY_MATCHING: 'status( code)?: (403|429|50[0-9])|Could not transfer artifact|Failed to read artifact descriptor|Unresolveable build extension|Non-resolvable import POM|Could not collect dependencies|UnknownHostException|Unknown host|Connection timed out|Connection reset|Premature end of Content-Length|Error getting https'
RETRY_ONLY_MATCHING: 'status( code)?: (403|429|50[0-9])|Could not transfer artifact|Failed to read artifact descriptor|Unresolveable build extension|Non-resolvable import POM|Could not collect dependencies|Could not resolve dependencies|UnknownHostException|Unknown host|Connection timed out|Connection reset|Premature end of Content-Length|Error getting https'
run: |
cd maven
bash ../scripts/ci/retry.sh xvfb-run -a mvn archetype:update-local-catalog -Plocal-dev-javase
Expand Down
45 changes: 45 additions & 0 deletions CodenameOne/src/com/codename1/impl/CodenameOneImplementation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2773,6 +2773,34 @@ public boolean isBaselineTextSupported() {
/// the width of the given string in this font instance
public abstract int stringWidth(Object nativeFont, String str);

/// Bulk caret measurement for a single directional text run. Ports with a shaping engine
/// should override this compatibility fallback to shape the run once.
public int[] getTextRunPositions(Object nativeFont, String text, boolean rtl) {
int[] positions = new int[text.length() + 1];
for (int i = 0; i < positions.length; i++) {
positions[i] = stringWidth(nativeFont, rtl ? text.substring(i) : text.substring(0, i));
}
return positions;
}

/// Revalidates a pure text client's top level and reveals its caret after the keyboard changes
/// the available viewport. Called on the EDT, independently of legacy native text widgets.
protected void revealTextInputClient(com.codename1.ui.TextInputClient client) {
if (!(client instanceof Component)) {
return;
}
Component component = (Component) client;
com.codename1.ui.TopLevelContainer top = component.getTopLevelContainer();
if (top == null) {
return;
}
component.requestFocus();
top.asContainer().revalidate();
int[] caret = client.getCaretRect();
component.scrollRectToVisible(caret[0] - component.getAbsoluteX(),
caret[1] - component.getAbsoluteY(), Math.max(1, caret[2]), Math.max(1, caret[3]), component);
}

/// Return the width of the specific character when rendered alone
///
/// #### Parameters
Expand Down Expand Up @@ -5264,6 +5292,23 @@ public void toggleMaximizeNativeWindow() {
public void closeNativeWindow() {
}

/// Publishes the custom Toolbar's native title-bar hit regions. Coordinates are
/// absolute component pixels relative to its window. The first x/y/width/height
/// rectangle is the title band; subsequent rectangles exclude interactive children.
/// An empty array clears the regions. Ports with native event tracking can use this
/// to start an OS window drag before dispatching a component pointer event.
public void setNativeWindowTitleBarRegions(Component toolbar, int[] regions) {
}

/// Returns reserved title-bar space for an integrated custom Toolbar, in component pixels.
/// The five entries are physical left, right, top, bottom insets and minimum band height.
/// Return null when native integration is unavailable. Called on the EDT during layout;
/// implementations must not call Java UI code while querying their native UI thread.
/// Mobile and browser ports retain the null implementation.
public int[] getNativeWindowTitleBarInsets(Component toolbar) {
return null;
}

/// Begins dragging the native desktop window (custom mode title bar). The arguments are
/// absolute pointer coordinates at the start of the drag. No-op without a native window.
///
Expand Down
Loading
Loading