fix onwindowattach/detach
This commit is contained in:
parent
db28251d40
commit
87f57dd710
|
|
@ -729,6 +729,7 @@ class AppRunner(DirectObject):
|
|||
if windowType == 'embedded':
|
||||
wp.setParentWindow(parent)
|
||||
base.win.requestProperties(wp)
|
||||
self.windowProperties = wp
|
||||
return
|
||||
|
||||
# If we haven't got a window already, start 'er up. Apply the
|
||||
|
|
|
|||
|
|
@ -2740,6 +2740,11 @@ void P3DInstance::
|
|||
paint_window() {
|
||||
#ifdef __APPLE__
|
||||
if (_swbuffer == NULL || !_instance_window_opened) {
|
||||
// We don't have a Panda3D window yet.
|
||||
return;
|
||||
}
|
||||
if (_splash_window != NULL && _splash_window->get_visible()) {
|
||||
// If the splash window is up, don't draw the Panda3D window.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,11 +127,14 @@ void P3DOsxSplashWindow::
|
|||
set_visible(bool visible) {
|
||||
P3DSplashWindow::set_visible(visible);
|
||||
|
||||
if (_visible) {
|
||||
ShowWindow(_toplevel_window);
|
||||
} else {
|
||||
HideWindow(_toplevel_window);
|
||||
if (_toplevel_window != NULL) {
|
||||
if (_visible) {
|
||||
ShowWindow(_toplevel_window);
|
||||
} else {
|
||||
HideWindow(_toplevel_window);
|
||||
}
|
||||
}
|
||||
refresh();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -33,6 +33,17 @@ get_wparams() const {
|
|||
return _wparams;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: P3DSplashWindow::get_visible
|
||||
// Access: Public
|
||||
// Description: Returns the current setting of the "visible" flag.
|
||||
// If false, the splash window is hidden.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
inline bool P3DSplashWindow::
|
||||
get_visible() const {
|
||||
return _visible;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: P3DSplashWindow::ImageData::Constructor
|
||||
// Access: Public
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public:
|
|||
inline const P3DWindowParams &get_wparams() const;
|
||||
|
||||
virtual void set_visible(bool visible);
|
||||
inline bool get_visible() const;
|
||||
|
||||
enum ImagePlacement {
|
||||
IP_background,
|
||||
|
|
|
|||
Loading…
Reference in New Issue