[Window] Pressing a header command button while the window is fullscreen will make it floating
See original GitHub issueBug Description
Pressing a header command button while the window is fullscreen will make it floating (without even changing the state).
Here is a minimal amount of code to reproduce this behaviour:
fun main() = auroraApplication {
val windowState = rememberWindowState()
AuroraWindow(
skin = marinerSkin(),
state = windowState,
onCloseRequest = ::exitApplication,
menuCommands = CommandGroup(
commands = listOf(
Command(
text = "Fullscreen Top",
secondaryContentModel = CommandMenuContentModel(
CommandGroup(
commands = listOf(
Command(
text = "Fullscreen",
action = {
if (windowState.placement == WindowPlacement.Floating) {
windowState.placement = WindowPlacement.Fullscreen
} else {
windowState.placement = WindowPlacement.Floating
}
}
)
)
)
)
)
)
)
) {
}
}
Platform Info
Aurora Version: Tested on both 1.1.0 and 1.2-SNAPSHOT (1.2-20220513.221833-4)
Issue Analytics
- State:
- Created a year ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
Build 20180: Window Control Buttons floating ( Weather App
When I open Weather App, I see that the window control buttons appear to be close to the middle of the app header....
Read more >How to hide fullscreen window header line in MacOS app?
To remove the title bar entirely, use NSWindow.StyleMask.Borderless . Note, by default this also disables the canBecomeKey and canBecomeMain properties which ...
Read more >Window guide - GLFW
Windowed mode windows can be made full screen by setting a monitor with glfwSetWindowMonitor, and full screen ones can be made windowed by ......
Read more ><iframe>: The Inline Frame element - HTML - MDN Web Docs
no-referrer : The Referer header will not be sent. ... allow-scripts : Lets the resource run scripts (but not create popup windows).
Read more >BrowserWindow | Electron
Create and control browser windows. ... When explicitly set to false the fullscreen button will be hidden or ... Emitted when an App...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is where you can put a breakpoint. Menu buttons are command buttons, and this is where Aurora calls the
action
block.This is where Compose Desktop tracks the placement as mutable state, so the updates to the underlying state probably happen on the next frame. Which is why there’s nothing from Compose or Aurora in there.
If I can reproduce this on my Windows 10 machine, I’ll start removing Aurora pieces to see if this is Aurora specific or not.
I am starting to understand. If we have two windows, the second window changes the global variable responsible for the current fullscreen window