diff --git a/direct/src/plugin/p3dOsxSplashWindow.cxx b/direct/src/plugin/p3dOsxSplashWindow.cxx index f11bd251a0..6a400e23c1 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.cxx +++ b/direct/src/plugin/p3dOsxSplashWindow.cxx @@ -104,10 +104,29 @@ set_wparams(const P3DWindowParams &wparams) { TransformProcessType(&psn, kProcessTransformToForegroundApplication); SetFrontProcess(&psn); - ShowWindow(_toplevel_window); + if (_visible) { + ShowWindow(_toplevel_window); + } } } +} +//////////////////////////////////////////////////////////////////// +// Function: P3DOsxSplashWindow::set_visible +// Access: Public, Virtual +// Description: Makes the splash window visible or invisible, so as +// not to compete with the embedded Panda window in the +// same space. +//////////////////////////////////////////////////////////////////// +void P3DOsxSplashWindow:: +set_visible(bool visible) { + P3DSplashWindow::set_visible(visible); + + if (_visible) { + ShowWindow(_toplevel_window); + } else { + HideWindow(_toplevel_window); + } } //////////////////////////////////////////////////////////////////// diff --git a/direct/src/plugin/p3dOsxSplashWindow.h b/direct/src/plugin/p3dOsxSplashWindow.h index 3cedb49f31..7fd01a5583 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.h +++ b/direct/src/plugin/p3dOsxSplashWindow.h @@ -34,6 +34,7 @@ public: virtual ~P3DOsxSplashWindow(); virtual void set_wparams(const P3DWindowParams &wparams); + virtual void set_visible(bool visible); virtual void set_image_filename(const string &image_filename, ImagePlacement image_placement); virtual void set_install_label(const string &install_label);