-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Window] Pressing a header command button while the window is fullscreen will make it floating #35
Comments
Not seeing this on my Mac. Is this specific to a certain OS or Java version? |
Looks like when the window is in fullscreen mode, pressing the "Fullscreen Top" menu activates the first menu command in it. That shouldn't happen, but if it's on a platform that I don't have access to, all I can do is point you to a few places in the code to debug. Right now, can you add a |
I have done this and the odd thing is that it only gets invoked when the correct button is pressed (so the sub-button here). Therefore, when the window is fullscreened and you press the topmost button and it becomes floating, nothing is supposedly getting invoked.
I don't believe this is the case as setting this up with other command menu buttons will still make the window floating when they are pressed despite their menus having nothing to do with managing the window state. |
It's not that it becomes floating. All Aurora popups are floating, anchored where they should. It's that the menu is displayed where it should, but the menu item action gets invoked incorrectly and your window exits the fullscreen mode, leaving that menu hanging in the corner. |
In this scenario, what is the codepath that moves the window back to |
In my app (below) that has more buttons that don't have anything to do with window state, pressing them will also change the window in this way. NVIDIA_Share_MwPaegS6dA.mp4
The thing is it's not even fully moving the window back to |
So it looks like when the window is in Does that transition back to floating placement only happen on clicking the menu buttons, or any other button in your app, say "Calculate" for example. In general, there's nothing special about the menu buttons in Aurora. They just happen to be displayed along the top edge of the window, but that's about it. |
Weirdly enough no - it only seems to be those top buttons. NVIDIA_Share_Hos53ER4h2.mp4 |
It probably fires twice, once for key press and once for key release |
Do you have any idea why the header buttons act this way however? |
One more question. What happens when you click to the right of the menu buttons? Same area around the top edge of the fullscreen window, but not on any Aurora menu button? |
As below, it only occurs on the button press: NVIDIA_Share_9grwTcViCR.mp4 |
prints out where the window resizing happens, but unfortunately it's happening as a separate event, so there's nothing from Compose or Aurora in there |
This is where you can put a breakpoint. Menu buttons are command buttons, and this is where Aurora calls the 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 can reproduce on Windows 10 |
If I add Don't want to say that this is Aurora or not yet. I'll need to see if I can reproduce this without any Aurora code. |
I believe this is somewhere in Compose Desktop's handling of fullscreen mode. This is the stacktrace (bottom left) on clicking that top-level menu when the window is fullscreen: And this is the same stack trace a little bit deeper in It'll probably take me a bit more time to get a reproducer without Aurora in it to file on Compose Desktop. Meanwhile tagging @igordmn for visibility into this |
Looking at the code a bit, I believe this is incorrect on the Compose desktop side. Aurora implements its popups as separate |
Sorry, I was mistaken. Could you make a reproducer for the issue in pure Compose? |
I am starting to understand. If we have two windows, the second window changes the global variable responsible for the current fullscreen window |
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:
NVIDIA_Share_DdMDm9Vkjs.mp4
Platform Info
Aurora Version: Tested on both 1.1.0 and 1.2-SNAPSHOT (1.2-20220513.221833-4)
The text was updated successfully, but these errors were encountered: