Floating dialogs do not remember their correct location
Steps to reproduce:
- Open Inkscape.
- Press Shift+Ctrl+D to open "document properties" dialog.
- Move it somewhere, say to the top left corner.
- Close dialog.
- Reopen (Shift+Ctrl+D again). It pops up in a different location.
What happened?
Dialog opens in a semi-random location, not where it was placed before.
What should have happened?
Proper position should be restored.
Inkscape Version and Operating System:
- 1.0beta1 (bbcb3915, 2019-10-05) (this bug present in 0.92.4 too).
- Operating System: Kubuntu 19.04
- KDE Plasma Version: 5.15.4
- KDE Frameworks Version: 5.56.0
- Qt Version: 5.12.2
- Kernel Version: 5.0.0-31-generic
- OS Type: 64-bit
The root of the problem is that this call to GdkWindow get_position returns garbage:
void DockItem::get_position(int& x, int& y) {
if (getWindow()) {
getWindow()->get_position(x, y);
} else {
x = _x;
y = _y;
}
}
Above function works when pressing F12 to hide all dialogs (when it's invoked at that time, dialog is still visible). It does not work on my system when dialog is being closed.
Other (all?) floating dialogs are impacted. "Text and Font", "Preferences", "XML Editor".