src/video/windows/SDL_windowswindow.c
changeset 5416 1b085f890c44
parent 5398 83816c8a2b58
child 5418 f8ecf0869cc9
equal deleted inserted replaced
5415:62712ceb7a48 5416:1b085f890c44
   580 void
   580 void
   581 WIN_SetWindowGrab(_THIS, SDL_Window * window)
   581 WIN_SetWindowGrab(_THIS, SDL_Window * window)
   582 {
   582 {
   583     HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   583     HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   584 
   584 
   585     if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
   585     if ((window->flags & SDL_WINDOW_INPUT_GRABBED) &&
   586         && (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
   586         (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
   587         RECT rect;
   587         RECT rect;
   588         GetClientRect(hwnd, &rect);
   588         GetClientRect(hwnd, &rect);
   589         ClientToScreen(hwnd, (LPPOINT) & rect);
   589         ClientToScreen(hwnd, (LPPOINT) & rect);
   590         ClientToScreen(hwnd, (LPPOINT) & rect + 1);
   590         ClientToScreen(hwnd, (LPPOINT) & rect + 1);
   591         ClipCursor(&rect);
   591         ClipCursor(&rect);