On Mon, 14 Apr 2025 17:17:23 GMT, Martin Fox <m...@openjdk.org> wrote:
> I have some issues with the premise of this pull request. It's true that a > window's iconified and maximized _properties_ can be true at the same time. > But the window itself can't be in both states at once; the user will never > see a window that's both maximized and iconified. We need some way to track > the actual state of the window and that's currently what the State in > ui/Window does. Changing this to a bitfield would require extensive changes > throughout the codebase. > The current behavior of RESTORE is correct. In terms of what the user sees > there are three possible states: maximized, iconified, and neither. We have > an event associated with entering each of these states (MAXIMIZE, MINIMIZE, > and RESTORE). Glass should only send RESTORE when the window has entered a > state that is neither maximized nor iconified so it's correct for the event > handler to clear both of those properties. That makes sense — I'll look into it. I remember it eventually calls the native code to unmaximize, but the issue might lie elsewhere. I think the same should apply to fullscreen for consistency. Note to myself: If this logic is correct, note that when restoring an iconified window that was maximized, it should be set back to maximized. > This PR doesn't include any glass changes so it's hard to evaluate. Currently > glass is tasked with notifying the core code when it enters a new state > (maximized, iconified, or neither) without taking into account which state it > was previously in. It looks like this PR is asking glass to distinguish > between maximized => neither and iconified => neither but this seems > redundant since the core code already knows the state and can figure this out. > > At the very least this should be marked as draft since it doesn't include any > glass changes. Yes, this PR is not ready, I will move it do DRAFT until I address your feedback. Thanks! Apologies — you did reply by email. It was my fault for not understanding it. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1777#issuecomment-2802577990