I'm trying to create my own logout dialog for Linux. It shows a small version of my wallpaper and 3 buttons for Logout, Restart and Shutdown.
I programmed it to have no title bar, not show up in the taskbar and have no Cancel option. So, apart from pressing the ESC key I want to be able to close the window by left clicking anywhere outside of it. So far, I can't work out how to do it. Maybe it's not possible?
The closest I got was clicking inside the window then moving the mouse outside the window and it closes, because I can work out how to detect a left click and then the mouse being outside the window, but that's not the effect I'm after.
I can also get it to close if I click in the window itself but not on the buttons, but again, that's not what I'm after exactly.
The question is basically, how do I detect a mouse click outside a window?
I could just add a Cancel button, but I'm awkward and like to do things the hard way.
Any ideas?
Thanks,
Moulder.


