MCPcopy Create free account
hub / github.com/carbonengine/trinity / ApplicationActivated

Method ApplicationActivated

trinity/TriDevice12.cpp:381–402  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: A chance for device to respond to application window being activated/deactivated. For DX11 platform we minimize fullscreen window when user alt-tabs from application and restore it back when he returns. This makes DX11 window behavior being consistent with DX9. Arguments: activated - true if applica

Source from the content-addressed store, hash-verified

379// activated - true if application was activated; false otherwise
380// --------------------------------------------------------------------------------------
381void TriDevice::ApplicationActivated( ApplicationActivation activated )
382{
383 CCP_STATS_ZONE( __FUNCTION__ );
384
385 if( !mPresentParam.windowed && mHwnd )
386 {
387 USE_MAIN_THREAD_RENDER_CONTEXT();
388 if( activated == APP_ACTIVATED )
389 {
390#if !USE_BORDERLESS_WINDOW
391 ChangeDevice( mAdapter, mHwnd, nullptr );
392#endif
393 }
394 else
395 {
396 ShowWindow( mHwnd, SW_MINIMIZE );
397#if !USE_BORDERLESS_WINDOW
398 ChangeDevice( mAdapter, mHwnd, nullptr );
399#endif
400 }
401 }
402}
403
404#endif

Callers 1

WndProcMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected