Port away from deprecated KWindowSystem API
Port position restoring to use an event filter to watch for the window getting shown/hidden instead of monitoring the window system
Use KX11Extras in X11-only codepaths
Use QWindow-based instead of WId-based API where appropriate