fix(macos): focus existing window on dock reopen + skin font NPE#374
Merged
Conversation
Application.reOpen(null) always called openEmpty(), so each macOS dock-icon click spawned a new empty ComboFrame. AppReopenedEvent semantics is "bring app to foreground", not "create new window". When called with a null frame, bring the most-recently-active frame in Current forward (de-iconify, toFront, requestFocus) and only fall back to openEmpty() when no frames exist.
Current is ordered by creation, not activity. Use getActiveFrame() which falls through to ComboFrame.LastActiveComboFrame (set on windowGainedFocus).
Owner
|
@chrisbendel Thank you very much for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ktgw0316 I've just recently started using this software for editing my own scans. I would love to contribute and help improve on the mac OS side of things, here's a few small bugs/improvements
Summary
Application.reOpen(null)now focuses the most-recently-activeComboFrameviagetActiveFrame()instead of always callingopenEmpty(). Stops macOS dock clicks from spawning duplicate empty windows.LightZoneFontSethardcodes aSansSerif 11ptfont. The previousUIManager.getFont("small.font")returned null with FlatLaf theme variants that don't register typography keys, NPE'ing<clinit>and bricking every subsequentComboFramebuild withNoClassDefFoundError../gradlew :macosx:runnow showsLightZonein the menubar/dock instead ofMacOSXLauncher. Adds-Xdock:nameand-Dapple.awt.application.nameto the application plugin's JVM args (previously only the beryx jpackage launcher set them).Test plan
LightZoneFontSet.<clinit>NPE