The popup menu of Xwayland window cannot close by clicking on the title bar
Qt popup menu, gtk popup menu and some browser menu all have this issue.
Xwayland popup menu will close if its mainwindow deactivate or click on the area outside of the popup menu but inside of the mainwindow. If we click on title bar the xwayland window can't recieve the mouse click event and it is still active, so its popup menu doesn't close.
This causes the popup menu to detach from the main window position when we drag the xwayland window.