Get event for leaving (fullscreen) window

Hi, I do WinXP SP3, Codeblocks w/MingW, SDL 1.2.14.

I’m wondering how would I get the event for the user leaving my fullscreen 640x480 window via pressing the Windows Key on the keyboard.

Of course the problem is when someone (such as myself) presses the Windows key, the mouse cursor goes up to the upper left of the (partial desktop) screen and stays there until I get into the ctrl-alt-delete scene. This is due to my mouse-warping once every loop to the center of the 640x480 screen that the game is on. Once I can detect this action, I will of course be able to avoid mouse-warping in this case. I’m thinking I should probably reset the video mode while I’m at it so they won’t have to scroll around as much.

Any responses would be appreciated, thanx in advance. -B

From http://www.libsdl.org/docs/html/sdlkey.html

SDLK_LSUPER left windows keySDLK_RSUPER right windows key
Any use? I actually used my Windows key to fix another key I broke while
cleaning the keyboard - Linux pride >:P

WilliamOn 28 August 2011 03:45, bala_48225 <bala_48225 at yahoo.com> wrote:

**
Hi, I do WinXP SP3, Codeblocks w/MingW, SDL 1.2.14.

I’m wondering how would I get the event for the user leaving my fullscreen
640x480 window via pressing the Windows Key on the keyboard.

Of course the problem is when someone (such as myself) presses the Windows
key, the mouse cursor goes up to the upper left of the (partial desktop)
screen and stays there until I get into the ctrl-alt-delete scene. This is
due to my mouse-warping once every loop to the center of the 640x480 screen
that the game is on. Once I can detect this action, I will of course be able
to avoid mouse-warping in this case. I’m thinking I should probably reset
the video mode while I’m at it so they won’t have to scroll around as much.

Any responses would be appreciated, thanx in advance. -B


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks, as soon as I told it to SDL_ShowCursor(SDL_ENABLE);, the video mode of the desktop magically became normal size and the cursor size got normal, even despite my every-loop mouse warp. I still told it to not warp anyway, just to be safe. -B

I found some good code here:

http://www.gamedev.net/topic/344795-how-to-check-if-sdl-window-is-active/