Added full support for WindowStatus App status is now based on actual app status instead of window visibility
This commit is contained in:
parent
e8c0cc0f71
commit
67354250fc
@ -506,12 +506,18 @@ void fgPlatformProcessSingleEvent ( void )
|
|||||||
{
|
{
|
||||||
case NAVIGATOR_WINDOW_FULLSCREEN:
|
case NAVIGATOR_WINDOW_FULLSCREEN:
|
||||||
LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_STATE-NAVIGATOR_WINDOW_FULLSCREEN");
|
LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_STATE-NAVIGATOR_WINDOW_FULLSCREEN");
|
||||||
INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_RESUME));
|
window->State.Visible = GL_TRUE;
|
||||||
|
INVOKE_WCB(*window, WindowStatus, (GLUT_FULLY_RETAINED));
|
||||||
break;
|
break;
|
||||||
case NAVIGATOR_WINDOW_THUMBNAIL:
|
case NAVIGATOR_WINDOW_THUMBNAIL:
|
||||||
|
LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_STATE-NAVIGATOR_WINDOW_THUMBNAIL");
|
||||||
|
window->State.Visible = GL_TRUE;
|
||||||
|
INVOKE_WCB(*window, WindowStatus, (GLUT_PARTIALLY_RETAINED));
|
||||||
|
break;
|
||||||
case NAVIGATOR_WINDOW_INVISIBLE:
|
case NAVIGATOR_WINDOW_INVISIBLE:
|
||||||
LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_STATE-NAVIGATOR_WINDOW_THUMBNAIL/NAVIGATOR_WINDOW_INVISIBLE");
|
LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_STATE-NAVIGATOR_WINDOW_INVISIBLE");
|
||||||
INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_PAUSE));
|
window->State.Visible = GL_FALSE;
|
||||||
|
INVOKE_WCB(*window, WindowStatus, (GLUT_HIDDEN)); //XXX Should this be GLUT_FULLY_COVERED?
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOGW("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_STATE unknown: 0x%X", SLOG2_FA_SIGNED(state));
|
LOGW("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_STATE unknown: 0x%X", SLOG2_FA_SIGNED(state));
|
||||||
@ -537,17 +543,40 @@ void fgPlatformProcessSingleEvent ( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
case NAVIGATOR_SWIPE_DOWN:
|
case NAVIGATOR_SWIPE_DOWN:
|
||||||
|
/* XXX Open app menu */
|
||||||
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_BACK:
|
case NAVIGATOR_BACK:
|
||||||
|
/* XXX Should this be a Special/SpecialUp event? */
|
||||||
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_WINDOW_ACTIVE:
|
case NAVIGATOR_WINDOW_ACTIVE:
|
||||||
|
LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_ACTIVE");
|
||||||
|
INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_RESUME));
|
||||||
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_WINDOW_INACTIVE:
|
case NAVIGATOR_WINDOW_INACTIVE:
|
||||||
|
LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_INACTIVE");
|
||||||
|
INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_PAUSE));
|
||||||
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_KEYBOARD_STATE:
|
case NAVIGATOR_KEYBOARD_STATE:
|
||||||
case NAVIGATOR_KEYBOARD_POSITION:
|
case NAVIGATOR_KEYBOARD_POSITION:
|
||||||
|
/* TODO Something needs to be done with this. Not sure what */
|
||||||
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_DEVICE_LOCK_STATE:
|
case NAVIGATOR_DEVICE_LOCK_STATE:
|
||||||
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_WINDOW_COVER:
|
case NAVIGATOR_WINDOW_COVER:
|
||||||
case NAVIGATOR_WINDOW_COVER_ENTER:
|
case NAVIGATOR_WINDOW_COVER_ENTER:
|
||||||
case NAVIGATOR_WINDOW_COVER_EXIT:
|
case NAVIGATOR_WINDOW_COVER_EXIT:
|
||||||
|
/* BlackBerry specific. Let app status and window status take care of everything */
|
||||||
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_APP_STATE:
|
case NAVIGATOR_APP_STATE:
|
||||||
//XXX Should probably do something with these
|
/* Can do the same as NAVIGATOR_WINDOW_ACTIVE/NAVIGATOR_WINDOW_INACTIVE but
|
||||||
|
seems less likely to work when the app comes to the foreground. Might be a bug */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -586,8 +615,7 @@ void fgPlatformMainLoopPostWork ( void )
|
|||||||
/* deal with work list items */
|
/* deal with work list items */
|
||||||
void fgPlatformInitWork(SFG_Window* window)
|
void fgPlatformInitWork(SFG_Window* window)
|
||||||
{
|
{
|
||||||
/* notify windowStatus/visibility */
|
LOGI("fgPlatformInitWork");
|
||||||
INVOKE_WCB( *window, WindowStatus, ( GLUT_FULLY_RETAINED ) );
|
|
||||||
|
|
||||||
/* Position callback, always at 0,0 */
|
/* Position callback, always at 0,0 */
|
||||||
fghOnPositionNotify(window, 0, 0, GL_TRUE);
|
fghOnPositionNotify(window, 0, 0, GL_TRUE);
|
||||||
|
Reference in New Issue
Block a user