[kmainwindow] Don't create native windows for non-toplevel windows
winId() creates a QPlaformWindow; i.e a native xcb_window or wl_surface. This makes sense for a toplevel which will be a real window.
If someone (in this case localize) uses kmainwindow as a subwidget inside an existing window the current code will create a subwindow for this widget. It's a very weird window, as the window is never actually mapped so all contents are drawn as part of the parent window. Leaving us in a very corrupt state.
Doing this on XCB is wasteful but the side effects are unnoticed. On QtWayland things explode in weird ways.
FWIW, I personally would also support someone saying that KMainWindow should only be used as a window and lokalize should be fixed. Though that would require someone else fixing it.
Edited by David Edmundson