Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11mouse.c @ 1657:5b0805ceb50f SDL-1.3
Merge trunk-1.3-2
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 28 Apr 2006 16:55:41 +0000 |
parents | 3ba88cb7eb1b |
children | 782fd950bd46 c121d94672cb 79a4c9017550 |
comparison
equal
deleted
inserted
replaced
1656:96c2f89cc7e1 | 1657:5b0805ceb50f |
---|---|
224 } | 224 } |
225 | 225 |
226 /* Check to see if we need to enter or leave mouse relative mode */ | 226 /* Check to see if we need to enter or leave mouse relative mode */ |
227 void X11_CheckMouseModeNoLock(_THIS) | 227 void X11_CheckMouseModeNoLock(_THIS) |
228 { | 228 { |
229 const Uint8 full_focus = (SDL_APPACTIVE|SDL_APPINPUTFOCUS|SDL_APPMOUSEFOCUS); | |
229 char *env_override; | 230 char *env_override; |
230 int enable_relative = 1; | 231 int enable_relative = 1; |
231 | 232 |
232 /* Allow the user to override the relative mouse mode. | 233 /* Allow the user to override the relative mouse mode. |
233 They almost never want to do this, as it seriously affects | 234 They almost never want to do this, as it seriously affects |
240 | 241 |
241 /* If the mouse is hidden and input is grabbed, we use relative mode */ | 242 /* If the mouse is hidden and input is grabbed, we use relative mode */ |
242 if ( enable_relative && | 243 if ( enable_relative && |
243 !(SDL_cursorstate & CURSOR_VISIBLE) && | 244 !(SDL_cursorstate & CURSOR_VISIBLE) && |
244 (this->input_grab != SDL_GRAB_OFF) && | 245 (this->input_grab != SDL_GRAB_OFF) && |
245 (SDL_GetAppState() & SDL_APPACTIVE) ) { | 246 (SDL_GetAppState() & full_focus) == full_focus ) { |
246 if ( ! mouse_relative ) { | 247 if ( ! mouse_relative ) { |
247 X11_EnableDGAMouse(this); | 248 X11_EnableDGAMouse(this); |
248 if ( ! (using_dga & DGA_MOUSE) ) { | 249 if ( ! (using_dga & DGA_MOUSE) ) { |
249 char *xmouse_accel; | 250 char *xmouse_accel; |
250 | 251 |