question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Window] Pressing a header command button while the window is fullscreen will make it floating

See original GitHub issue

Bug 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
                                        }
                                    }
                                )
                            )
                        )
                    )
                )
            )
        )
    ) {

    }
}

https://user-images.githubusercontent.com/74878137/169148532-825f8d99-5371-4fb1-8dc5-d9f34695b33c.mp4

Platform Info

Aurora Version: Tested on both 1.1.0 and 1.2-SNAPSHOT (1.2-20220513.221833-4)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:20 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
kirill-grouchnikovcommented, May 18, 2022

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.

0reactions
igordmncommented, May 19, 2022

the code treats this as a signal that the main window should exit its fullscreen mode

I am starting to understand. If we have two windows, the second window changes the global variable responsible for the current fullscreen window

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found