diff src/video/win32/SDL_win32events.c @ 1734:f7c667ded87d SDL-1.3

The general code handles restoring video mode/gamma/etc. when the window loses focus. Support for changing fullscreen/windowed mode in progress.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 Jul 2006 18:09:16 +0000
parents 0b1070f2f94d
children
line wrap: on
line diff
--- a/src/video/win32/SDL_win32events.c	Sun Jul 09 09:02:26 2006 +0000
+++ b/src/video/win32/SDL_win32events.c	Sun Jul 09 18:09:16 2006 +0000
@@ -453,26 +453,11 @@
                 }
                 if (keyboard && keyboard->focus != data->windowID) {
                     SDL_SetKeyboardFocus(index, data->windowID);
-
-                    if (SDL_GetWindowFlags(data->windowID) &
-                        SDL_WINDOW_INPUT_GRABBED) {
-                        RECT rect;
-
-                        GetClientRect(hwnd, &rect);
-                        ClientToScreen(hwnd, (LPPOINT) & rect);
-                        ClientToScreen(hwnd, (LPPOINT) & rect + 1);
-                        ClipCursor(&rect);
-                    }
                 }
                 /* FIXME: Update keyboard state */
             } else {
                 if (keyboard && keyboard->focus == data->windowID) {
                     SDL_SetKeyboardFocus(index, 0);
-
-                    if (SDL_GetWindowFlags(data->windowID) &
-                        SDL_WINDOW_INPUT_GRABBED) {
-                        ClipCursor(NULL);
-                    }
                 }
                 if (minimized) {
                     SDL_SendWindowEvent(data->windowID,
@@ -782,7 +767,7 @@
 
             window_flags = SDL_GetWindowFlags(data->windowID);
             if ((window_flags & SDL_WINDOW_INPUT_GRABBED) &&
-                (window_flags & SDL_WINDOW_KEYBOARD_FOCUS)) {
+                (window_flags & SDL_WINDOW_INPUT_FOCUS)) {
                 ClipCursor(&rect);
             }