Skip to content

Conversation

@FeodorFitsner
Copy link
Contributor

@FeodorFitsner FeodorFitsner commented Aug 25, 2025

Fix #5572

Summary by Sourcery

Sync window state properties on window events to fix the minimize issue on Linux and ensure accurate state tracking.

Bug Fixes:

  • Fix the window minimize issue on Linux by properly updating the minimized state when a window event occurs

Enhancements:

  • Synchronize full window state (size, position, opacity, maximized/minimized flags, visibility, focus, and other window attributes) in onWindowEvent
  • Remove unused import of flutter/foundation.dart from window.dart

Synchronizes internal window state variables with the latest values from getWindowState() before notifying the backend on window events. Ensures state properties are up-to-date when handling window events other than resize, resized, and move.
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@cloudflare-workers-and-pages
Copy link

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 977f39d
Status: ✅  Deploy successful!
Preview URL: https://0d40658e.flet-docs.pages.dev
Branch Preview URL: https://v1-fix-minimize-bug.flet-docs.pages.dev

View logs

@FeodorFitsner FeodorFitsner requested a review from Copilot August 25, 2025 19:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes a window minimize issue on Linux by synchronizing window state properties when window events occur. The PR removes an unused import and ensures proper state tracking for all window attributes.

  • Synchronizes all window state properties (size, position, minimized/maximized flags, etc.) in the onWindowEvent method
  • Removes unused import of flutter/foundation.dart
  • Fixes the minimize issue on Linux by properly updating the minimized state

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@ndonkoHenri ndonkoHenri left a comment

Choose a reason for hiding this comment

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

lgtm

@FeodorFitsner FeodorFitsner merged commit 496b0b0 into main Aug 25, 2025
4 of 6 checks passed
@FeodorFitsner FeodorFitsner deleted the v1-fix-minimize-bug branch August 25, 2025 20:57
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.

v1: Programmatically minimizing the window only works first time

3 participants