Fixed bug #101
If we lose focus at all, unlock the mouse. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401677
This commit is contained in:
parent
592d2604d0
commit
42d0cb5f28
2 changed files with 3 additions and 2 deletions
|
@ -666,7 +666,7 @@ void X11_PumpEvents(_THIS)
|
||||||
} else {
|
} else {
|
||||||
switch_time = now + 200;
|
switch_time = now + 200;
|
||||||
}
|
}
|
||||||
} else if ( now >= switch_time ) {
|
} else if ( (int)(switch_time-now) <= 0 ) {
|
||||||
Uint32 go_fullscreen;
|
Uint32 go_fullscreen;
|
||||||
|
|
||||||
go_fullscreen = switch_waiting & SDL_FULLSCREEN;
|
go_fullscreen = switch_waiting & SDL_FULLSCREEN;
|
||||||
|
|
|
@ -226,6 +226,7 @@ static void SetMouseAccel(_THIS, const char *accel_param)
|
||||||
/* Check to see if we need to enter or leave mouse relative mode */
|
/* Check to see if we need to enter or leave mouse relative mode */
|
||||||
void X11_CheckMouseModeNoLock(_THIS)
|
void X11_CheckMouseModeNoLock(_THIS)
|
||||||
{
|
{
|
||||||
|
const Uint8 full_focus = (SDL_APPACTIVE|SDL_APPINPUTFOCUS|SDL_APPMOUSEFOCUS);
|
||||||
char *env_override;
|
char *env_override;
|
||||||
int enable_relative = 1;
|
int enable_relative = 1;
|
||||||
|
|
||||||
|
@ -242,7 +243,7 @@ void X11_CheckMouseModeNoLock(_THIS)
|
||||||
if ( enable_relative &&
|
if ( enable_relative &&
|
||||||
!(SDL_cursorstate & CURSOR_VISIBLE) &&
|
!(SDL_cursorstate & CURSOR_VISIBLE) &&
|
||||||
(this->input_grab != SDL_GRAB_OFF) &&
|
(this->input_grab != SDL_GRAB_OFF) &&
|
||||||
(SDL_GetAppState() & SDL_APPACTIVE) ) {
|
(SDL_GetAppState() & full_focus) == full_focus ) {
|
||||||
if ( ! mouse_relative ) {
|
if ( ! mouse_relative ) {
|
||||||
X11_EnableDGAMouse(this);
|
X11_EnableDGAMouse(this);
|
||||||
if ( ! (using_dga & DGA_MOUSE) ) {
|
if ( ! (using_dga & DGA_MOUSE) ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue