Before proceeding further, note that using xkill is dangerous and you must be absolutely sure about what you are doing. Now that the statutory warning is in place, xkill kills those stubborn windows from applications that won’t get killed.
xkill does not forced quit, it does not save any state neither does it do any clean-up, it is a forced disconnection of the client from the X server. There will be no prompts either. It is useful for aborting programs that have displayed undesired windows on a user’s screen.
To install xkill on Ubuntu, run
$ sudo apt-get install x11-utils
Run the xkill command and it will change the mouse pointer to a skull. Left click on the rogue window and it will be killed immediately. The X11 server will close its connection to the client that created the window.
Just make sure that you don’t click on the wrong window!