Handle QEvent::WinIdChange event and reset X11 window properties correctly.