JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.15k stars 1.17k forks source link

[Desktop] Closing full screen is not working correctly #4380

Closed MohamedRejeb closed 1 month ago

MohamedRejeb commented 8 months ago

Describe the bug When I share the window state placement to WindowPlacement.FullScreen everything works fine but I change it back to WindowPlacement.Maximized it remains full screen.

Affected platforms

Versions

To Reproduce Steps and/or the code snippet to reproduce the behavior:

  1. Change window state placement to WindowPlacement.FullScreen
  2. Change window state placement to WindowPlacement.Maximized
  3. You will see that the window is still in full-screen mode.

This is a screen recording describing the issue: https://github.com/JetBrains/compose-multiplatform/assets/41842296/4d7df284-b367-4452-bc34-8e7965425597

Expected behavior The full-screen mode should be disabled.

This is a screen recording describing the expected behavior: https://github.com/JetBrains/compose-multiplatform/assets/41842296/0b42c46e-b761-4f5b-b8d0-9e06e1ee366e

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

dima-avdeev-jb commented 8 months ago

@MohamedRejeb Can you please create a minimal reproducible sample project on this problem and share it on GitHub?

MohamedRejeb commented 8 months ago

Here's a minimal reproducible sample project: https://github.com/MohamedRejeb/CMPIssue4380

It's happening only for macos, try to click: floating -> fullscreen -> floating and the placement will end up maximized instead of floating. Also you can try fullscreen -> maximized and the fullscreen will exit correctly.

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.