Skip to content

Remove unused native rubberband support - #26

Merged
sylvestre merged 6 commits into
opencollab:masterfrom
danilovesky:cleanup-unused-rubberband
Nov 5, 2026
Merged

sylvestre merged 6 commits into
opencollab:masterfrom
danilovesky:cleanup-unused-rubberband

Conversation

@danilovesky

@danilovesky danilovesky commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

The native rubberband Java wrappers were already removed (see "Remove the rubberband native capabilities" in release-notes.txt), but their resources and loading code remained. On every OS the loader tried to instantiate the missing Win32RubberBand, XlibRubberBand and X11RubberBand classes and fell back to the default RubberBand. With rubberband.debug=true (set in dev-props.properties), this printed exceptions on Linux.

Changes:

  • Remove the native RubberBand.dll and libRubberBand.so, the <os> blocks in drag-effects.xml and the OS-based loading in EffectsManager
  • Remove dev-props.properties and the rubberband.debug flag
  • Remove OsInfo and os-info.xml which only served OS-based loading
  • Make the default RubberBand an explicit no-op, clean up dead code in DragPipeline, and delete RubberBandTest
  • Add an unreleased section to release-notes.txt for these changes, the Applet removal, the build requirements, and the bug-fixes since last release

Behaviour is unchanged: the default rubberband already drew nothing, and custom ones set through DockingManager.setRubberBand work as before.

Closes #25

The Java wrappers for the native rubberband libraries were removed
earlier, so the DLL, the shared library and the per-OS entries in
drag-effects.xml could never be loaded. Load the default rubberband
directly, report failures to create a custom one, and drop the
rubberband.debug flag together with dev-props.properties.
It was only used to select the OS-specific rubberband.
@mergify

mergify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@sylvestre

Copy link
Copy Markdown
Contributor

thanks for working on this!
DockingManager still loads the deleted dev-props.properties (see the inline comment). Please remove that too.

private static RubberBand createRubberBand(String implClass) {
boolean failSilent = !Boolean.getBoolean(RubberBand.DEBUG_OUTPUT);
return (RubberBand)Utilities.createInstance(implClass, RubberBand.class, failSilent);
return (RubberBand)Utilities.createInstance(implClass, RubberBand.class);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DockingManager still has DEV_PROPS and loads dev-props.properties in init() (line 107 and 197)
could you please remove that too? the file is gone now

}

/**
* Paints the outline of the specified screen rectangle. The default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need 8 lines of javadoc for a no-op? please make it shorter :)

<rubber-band class="org.flexdock.docking.drag.outline.x11.X11RubberBand" />
</os>
</rubber-bands>
<rubber-bands default="org.flexdock.docking.drag.effects.RubberBand" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OsInfo was public, could you please add an entry in release-notes.txt?

Remove the unreachable XOR drawing code and the unused locals and
commented-out code in DragPipeline. Delete RubberBandTest, which can
not show anything with the no-op rubberband.
The dev-props.properties resource no longer exists, so copying it
into the system properties during DockingManager initialization
never had any effect.
ResourceManager.loadLibrary(), LIBRARY_EXTENSION and
isWindowsPlatform() were only meant for the native rubberband
libraries, which no longer exist.
List the rubberband cleanup, the removed public API and the 1.3.1
fixes from the reverted version bump commit.
@danilovesky
danilovesky force-pushed the cleanup-unused-rubberband branch from 0c5232e to bada3bd Compare November 5, 2026 14:20
@danilovesky

Copy link
Copy Markdown
Contributor Author

@sylvestre I have addressed the above comments.
For release-notes.txt update I added a new section "Changes since last release" that summarises all the changes since last release - we can rename it into "flexdock x.x RELEASE NOTES" when preparing the next release.

@sylvestre
sylvestre merged commit 625221d into opencollab:master Nov 5, 2026
7 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

@danilovesky
danilovesky deleted the cleanup-unused-rubberband branch November 6, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native RubberBand leftovers print exceptions on Linux and do nothing

2 participants