diff --git a/panda/src/wgldisplay/wglGraphicsWindow.cxx b/panda/src/wgldisplay/wglGraphicsWindow.cxx index acf632cd70..a74e2e16d2 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.cxx +++ b/panda/src/wgldisplay/wglGraphicsWindow.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #define WGL_WGLEXT_PROTOTYPES #include "wglext.h" @@ -1221,6 +1222,8 @@ void wglGraphicsWindow::deactivate_window(void) { return; } + throw_event("PandaPaused"); // right now this is used to signal python event handler to disable audio + if(!bResponsive_minimized_fullscreen_window) { if(wgldisplay_cat.is_spam()) wgldisplay_cat.spam() << "WGL window deactivated, releasing gl context and waiting...\n"; @@ -1258,6 +1261,10 @@ void wglGraphicsWindow::deactivate_window(void) { wgldisplay_cat.error() << "Error in SetTimer!\n"; } } + + if(_props._fullscreen) { + throw_event("PandaRestarted"); // right now this is used to signal python event handler to re-enable audio + } } void wglGraphicsWindow::reactivate_window(void) {