Add RFC: Switch to Advanced Docking System
Summary
- Switch main dock system to ADS
- Make ADS dock state per profile
- Allow the user to switch between pre-made layouts
- Plugins could register their own
- Users could save their own
- Dock added by plugins with the old methods are added as "Legacy dock"
Note: The "central widget" design is kept for now.
Motivation and Context
- Provide a better dock system to end-users.
- I consider that I made enough progress on my WIP branches to make this RFC.
- Also because I require feedback about the dock separation part.
- Link to RFC: https://github.com/tytan652/rfcs/blob/advanced_docking/text/0047-switch-to-advanced-docking-system.md
- OBS with ADS test binaries: https://github.com/tytan652/obs-studio/pull/6
My WIP branches:
- Dock separation
- Central widget separation
- Switch to ADS
- Frontend API to add ADS dock
- DockState per profile
Potential ideas suggestions completed by this RFC:
- https://ideas.obsproject.com/posts/1257/ui-layout-profiles
- https://ideas.obsproject.com/posts/418/docks-visible-when-obs-minimized
- https://ideas.obsproject.com/posts/615/ui-collections
- https://ideas.obsproject.com/posts/164/allow-saving-of-visible-docks-layouts
Wayland is not properly supported by Qt yet. If you use Wayland, then you should set the session type to x11: XDG_SESSION_TYPE=x11 ./AdvancedDockingSystemDemo. You will find more details about this in issue https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/288.
@GeorgesStavracas ?
Wayland is not properly supported by Qt yet. If you use Wayland, then you should set the session type to x11: XDG_SESSION_TYPE=x11 ./AdvancedDockingSystemDemo. You will find more details about this in issue githubuser0xFFFF/Qt-Advanced-Docking-System#288.
I want to precise this is the same for Qt Docking System, it's not properly supported either.
Edit note: I wish to avoid having to add a platform like OBS_NIX_PLATFORM_XWAYLAND because both docking system don't work properly under Wayland because Qt maybe don't care about that or consider it not a priority at all.
Wayland is not properly supported by Qt yet. If you use Wayland, then you should set the session type to x11: XDG_SESSION_TYPE=x11 ./AdvancedDockingSystemDemo. You will find more details about this in issue githubuser0xFFFF/Qt-Advanced-Docking-System#288.
@GeorgesStavracas ?
I feel somewhat hopeless that we'll ever see good Wayland support for Qt. It's not only qt-wayland still has glaring bugs; the commercial nature of Qt means that if we contribute with bugfixes, they take way too long to be reviewed, and even when they're accepted, they're not backported. The Wayland backend is third-class on their priorities, the core of Qt is itself modelled against X11 and Windows APIs, and qt-wayland is merely an afterthought, often incompatible with the abstractions in place. In other words, qt-wayland seems to be there to check some boxes for customers, not to have actual Wayland support.
So yeah, I don't think we'll see proper docking using subsurfaces and the xdg-positioner protocol any time soon. And even if Qt magically gains such support, ADS would still need to be adapted, which would probably mean another year or more.
(Though, I must say, I'm a little skeptical about the entire docking concept. Docking leaks app-specific logic into the window management realm, and then we have problems with tiling, window ownership, modality, and basically break the app on anything that is not the traditional floating window model. But I digress.)
I'm not sure if the expectation is for me to fix that? If so, sorry, I have little motivation to contribute to qt-wayland upstream these days. I still have a bitter taste in my mouth for trying to fix that Wayland crash last year. :slightly_frowning_face:
I wish to avoid having to add a platform like OBS_NIX_PLATFORM_XWAYLAND
There is no Xwayland platform at all :) There is either X11, or Wayland. If an app is running as X11, it should pick X11 code paths; if an app is running as a Wayland app, it should pick Wayland paths; there is no in-between there.
So yeah, I don't think we'll see proper docking using subsurfaces and the xdg-positioner protocol any time soon. And even if Qt magically gains such support, ADS would still need to be adapted, which would probably mean another year or more.
Just want to precise that ADS does not rely on Qt Docking System implementation. So if possible (I have no experience with Wayland development), a support of Wayland could be added to ADS.
Just want to precise that ADS does not rely on Qt Docking System implementation. So if possible (I have no experience with Wayland development), a support of Wayland could be added to ADS.
That's correct, what I was trying to say is that both Qt's docking system and ADS rely on lower level interfacing with the windowing system, which in this case doesn't exist for qt-wayland.
- Updated transition widget
- Added what could be done if the switch to ADS is done with the switch to Qt6
- Rename every function with
_adv_dockto_dockor_dock_2
~~Put as draft to prioritize #53 over this.~~
Putting aside the Wayland issues, is there other comments or concerns here?
Undraft to avoid the "it's a draft so no need to review for now" situation even if there is still some TODO.