- bugfixes related to SDL library upgrade on windows build and mouse cursor toggling (especially that stupid windows 7 issue where alt-tab doesn't let you move your cursor in fullscreen mode)

For reference: http://bugzilla.libsdl.org/show_bug.cgi?id=849
This commit is contained in:
Mark Vejvoda
2010-08-23 07:27:31 +00:00
parent 6907d7d063
commit b9b9cc822b
7 changed files with 22 additions and 22 deletions

View File

@@ -819,9 +819,9 @@ void sleep(int millis) {
void showCursor(bool b) {
//int x,y;
if(b) {
//if(b) {
//SDL_GetMouseState( &x, &y );
}
//}
int state = SDL_ShowCursor(SDL_QUERY);
if( (state == SDL_DISABLE && b == false) ||
(state == SDL_ENABLE && b == true)) {
@@ -830,7 +830,7 @@ void showCursor(bool b) {
SDL_ShowCursor(b == true ? SDL_ENABLE : SDL_DISABLE);
//SDL_WM_GrabInput(SDL_GRAB_OFF);
//if(b) {
//if(b == true) {
//SDL_WM_GrabInput(SDL_GRAB_OFF);
//SDL_WarpMouse(x,y);
//}

View File

@@ -219,7 +219,7 @@ bool Window::handleEvent() {
}
*/
// Check if the program has lost window focus
if (event.active.state == SDL_APPACTIVE) {
if (event.active.state & SDL_APPACTIVE == SDL_APPACTIVE) {
if (event.active.gain == 0) {
Window::isActive = false;
}
@@ -249,9 +249,9 @@ bool Window::handleEvent() {
showCursor(willShowCursor);
}
*/
if (event.active.state != SDL_APPMOUSEFOCUS &&
event.active.state != SDL_APPINPUTFOCUS &&
event.active.state != SDL_APPACTIVE) {
if (event.active.state & SDL_APPMOUSEFOCUS != SDL_APPMOUSEFOCUS &&
event.active.state & SDL_APPINPUTFOCUS != SDL_APPINPUTFOCUS &&
event.active.state & SDL_APPACTIVE != SDL_APPACTIVE) {
if (event.active.gain == 0) {
Window::isActive = false;
}