Repository navigation
Fix Frame.setState() - #66
Open
duncanmcqueen wants to merge 1 commit into
Open
duncanmcqueen wants to merge 1 commit into
duncanmcqueen wants to merge 1 commit into
Conversation
This was referenced Oct 14, 2026
duncanmcqueen
marked this pull request as ready for review
October 14, 2026 23:52
Contributor
|
CI is failing because the Malva test suite now has a test for mmap :-) Can you rebase on top of latest master (please rebase instead of adding a merge commit) and force push? |
guillerodriguez
force-pushed
the
fix-frame-setstate
branch
from
October 15, 2026 08:57
fe411ab to
ce95ec7
Compare
Contributor
Nevermind, just did that myself :-) |
Contributor
Author
|
Thank you!!! |
guillerodriguez
force-pushed
the
fix-frame-setstate
branch
from
October 15, 2026 12:17
b3bbdad to
f448005
Compare
setState(NORMAL) added ICONIFIED to an iconified frame and setState(ICONIFIED) removed it, the opposite of the request. Remove ICONIFIED for NORMAL and add it for ICONIFIED, and keep the other state bits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: duncanmcqueen <dwmcqueen@gmail.com>
guillerodriguez
force-pushed
the
fix-frame-setstate
branch
from
October 15, 2026 12:18
f448005 to
849d2f6
Compare
guillerodriguez
approved these changes
Oct 15, 2026
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.
Split from #58.
Problem and fix
Frame.setState()does the opposite of the request:setState(ICONIFIED)on a normal frame callssetExtendedState(current & ~ICONIFIED). The frame stays normal.setState(NORMAL)on an iconified frame callssetExtendedState(current | ICONIFIED). The frame stays iconified.Also, the test for
ICONIFIEDis(current & ~ICONIFIED) == 0. Thus a maximized frame cannot become iconified.Now
NORMALremoves theICONIFIEDbit andICONIFIEDadds it. The other state bits do not change.How to reproduce
The frame does not have to be visible. The test needs a display, because the GTK peer must start.
FrameSetState.javaResults
Linux x86_64, ingelabs/classpath
master(0406074), JamVMmaster,javacfrom JDK 8, autoconf 2.73, automake 1.19, theconfigureoptions of the CI Linux job, out-of-tree build. "Before" ismaster. "After" ismasterwith this commit.OpenJDK 27 also gives the "After" result.
Platforms
Not specific to Haiku. The problem is in
java.awt.Frameand occurs with all toolkits that supportICONIFIED. I reproduced it on Linux with the GTK peer.AI assistance
An AI model (Claude Code, by Anthropic) wrote this change, the test and this text. The repository owner directed the work and checked the results. Please review it as you review other contributions.
🤖 Generated with Claude Code