SDLers,
SDL-1.1.8, SDL-image 1.1.0, linux rh6.2
I can open a window, display stuff in it, and everything is nice.
Then I start to check for events.
I can detect key clicks in the SDL window
I can detect when the user clicks with the left mouse button on the cross
at the top right of the SDL window.
(just look for events of type SDL_QUIT returned from SDL_PollEvent() )
All works fine, until the user selects the cross with the right mouse button.
You get messages like:
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 129 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Resource id in failed request: 0x440000c
Serial number of failed request: 98
Current serial number in output stream: 99
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 10 (X_UnmapWindow)
Resource id in failed request: 0x4400002
Serial number of failed request: 83
Current serial number in output stream: 88
I looked at several packages, eggchess, bugsquish, flywindows (apologies to authors
for naming your packages) and each produced the same error message on using the
right mouse button to close/destroy the window.
Sure, I can do some fancy things with wm_delete_atom (under X) to trap for RMB.
But, I want to be cross platform in the software.
So how does one trap the RMB on the cross under SDL ???
Thanks in advance,
Derek.