Skip to content

Dialog docking framework fixes, fixed MR

Mike Kowalski requested to merge mkov/inkscape:dlg-manager into master

Dialog docking framework changes and bug fixes.

[Note: resubmitted MR, no gradient editor deps]

While I intended to fix floating dialog positioning only, I uncovered other problems and this task grew larger than expected.

This is still mostly a bug fix patch for the new docking framework. I think it was missing some features present in Inkscape 1.0, so functionality regressed. This MR tries to address those gaps.

  1. Fix: floating dialogs stay on top of the main window (adopted LPE dialog approach, since it works)
  2. Fix: no more multiple copies of the same floating dialog
  3. Fix: keyboard shortcuts work when floating dialog is active / has focus (regression)
  4. Fix: floating dialog windows get disposed of when closed (deleting them just like main windows are)
  5. Fix: floating dialogs state is remembered (their location, as well as pages inside floating dialog)
  6. Fix: once dialog is popped out of the dock, its floating state is honored (and remembered)
  7. Fix: insidious on_unmap bug where signal handler was pointing to overloaded function, thus called twice
  8. Fix: undefined behavior in DialogMultipaned destructor, using iterator after vector change
  9. Fix: KeyFile leaks in DialogContainer
  10. Change: modified DialogContainer to have more granular state loading/saving
  11. Change: added DialogManager singleton to deal with dialogs state (re)storing
  12. Change: tasked Inkscape app and window with finding the right timing for saving/loading dialog state
  13. Change: added functions to store/restore window position. On Kubuntu with X-Server this positioning happens to work across multiple monitors.

I'm aware of more potential issues, like dialog window flashing when restoring state, or possible widget leaks in DialogMultipaned. It could be that I overlooked other problems or, gasp, introduced new ones.

I only tested this MR in Kubuntu with X-Server. Help with testing it on Wayland/Mac/Win is very much needed.

Edited by Mike Kowalski

Merge request reports