-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[detach-window] Attach windows on close instead of show #8089
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
[detach-window] Attach windows on close instead of show #8089
Conversation
|
no longer relevant |
|
Done. It seems many secondary widgets such as ITW and similar do get closed instead of attaching though, perhaps it's a matter of simply making them inherit the mentioned DetachableWidget (&-Window). I do believe this would better be done by having a transparent "event widget" acting as middle man between these two, so that the detached component stays in a container (we currently expose it directly and need inheritance to have shared functionality). This could also act as a starting ground for CSD if we ever decide we want them. However I think that goes out of scope of this particular PR. Note: most CI builds fail because the workflow files are not updated from master. |
|
lmms.zip |
13379db to
fab4127
Compare
|
I'll merge, then resolve the merge conflicts in the |
|
Looks like instrument windows do not reattach after they've been detached. And due to #7595, if I detach a window, move it to my 2nd monitor, then click the close button to reattach it, the window is harder to find because no scrollbars are present in the workspace anymore. Users who don't know they can drag the workspace to navigate around will probably be unable to find the window at all. |
I'm working on rewriting
I don't have a multi-monitor setup, so I don't really know how that works. If I understand correctly, X11 multimonitor setups where windows are movable between them are pretty much just a cut view of a big X11 canvas, so realistically I don't see any way to check if a window is on a different monitor and whatnot. And I also don't know how Windows part of this works, with all its different modes. Maybe I should just check for top-left corner being out of bounds, and if it is just don't move the SubWindow? I.e. out of bounds that would work the way it currently works in wayland-native mode. |
You should be able to achieve the same effect by letting the main LMMS window occupy half of your screen, moving a detached window to the other half of your screen, then closing it. |
Rationale:
show()is called)Drawbacks:
in current implementation could throw a segfault if not used carefully. Probably can be fixed, but I don't know the preferable method.Additionally, it doesn't seem thatDetachableWidgethas any uses outside the SubWindow, so it could be narrowed down to a compile-time check (unsure about plugins though)Additional considerations:
SubWindowchanges, and outright failed to work with my initial attempts. If anyone has better luck, they're welcome. Worthy of note, additional actions would be required to make floating windows stand out against attached ones, plus this wouldn't fit desktop theming.