From cf6a220cb7c2653b2761195cfcd8a83aca22d20f Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 22 Aug 2009 22:17:05 +0000 Subject: [PATCH] minor tweaks --- direct/src/plugin/p3dInstance.cxx | 10 +++++++--- direct/src/plugin/p3dOsxSplashWindow.cxx | 5 +++-- direct/src/plugin_npapi/ppInstance.cxx | 13 ++++--------- direct/src/plugin_standalone/panda3d.cxx | 1 - 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/direct/src/plugin/p3dInstance.cxx b/direct/src/plugin/p3dInstance.cxx index 7f6110c1b1..70be979dc7 100644 --- a/direct/src/plugin/p3dInstance.cxx +++ b/direct/src/plugin/p3dInstance.cxx @@ -1183,9 +1183,13 @@ make_splash_window() { // Don't know where to put it yet. return; } - if (_wparams.get_window_type() == P3D_WT_toplevel && !_stuff_to_download) { - // If it's a toplevel window, then we don't want a splash window - // until we have stuff to download. + if (_wparams.get_window_type() == P3D_WT_hidden) { + // We're hidden, and so is the splash window. + return; + } + if (_wparams.get_window_type() != P3D_WT_embedded && !_stuff_to_download) { + // If it's a toplevel or fullscreen window, then we don't want a + // splash window until we have stuff to download. return; } diff --git a/direct/src/plugin/p3dOsxSplashWindow.cxx b/direct/src/plugin/p3dOsxSplashWindow.cxx index 60f4145f8c..89ebd97576 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.cxx +++ b/direct/src/plugin/p3dOsxSplashWindow.cxx @@ -78,8 +78,9 @@ set_wparams(const P3DWindowParams &wparams) { r.top = _wparams.get_win_y(); r.left = _wparams.get_win_x(); if (r.top == 0 && r.left == 0) { - r.top = 250; - r.left = 210; + // These are the same defaults used by Panda's osxGraphicsWindow. + r.top = 50; + r.left = 10; } r.right = r.left + _wparams.get_win_width(); diff --git a/direct/src/plugin_npapi/ppInstance.cxx b/direct/src/plugin_npapi/ppInstance.cxx index 5afcca17e4..7d4b180575 100644 --- a/direct/src/plugin_npapi/ppInstance.cxx +++ b/direct/src/plugin_npapi/ppInstance.cxx @@ -191,9 +191,7 @@ new_stream(NPMIMEType type, NPStream *stream, bool seekable, uint16 *stype) { // We don't want the rest of this stream any more, but we can't // just return NPERR_GENERIC_ERROR, though--that seems to freak - // out Mozilla. Instead, we'll "accept" it for now, and then - // immediately stop it when we get the first write_stream() - // call. + // out Firefox. stream->notifyData = new PPDownloadRequest(PPDownloadRequest::RT_instance_data); *stype = NP_NORMAL; @@ -255,11 +253,10 @@ write_stream(NPStream *stream, int offset, int len, void *buffer) { return len; case PPDownloadRequest::RT_instance_data: - // Here's a stream we don't really want. But stopping it early + // Here's a stream we don't really want. But stopping it here // seems to freak out Safari. (And stopping it before it starts - // freaks out Firefox.) - - // Whatever. We'll just quietly ignore the data. + // freaks out Firefox.) Whatever. We'll just quietly ignore the + // data. return len; default: @@ -301,8 +298,6 @@ destroy_stream(NPStream *stream, NPReason reason) { break; case PPDownloadRequest::RT_instance_data: - // We won't get a url_notify on this one, so delete it now. - delete req; break; default: diff --git a/direct/src/plugin_standalone/panda3d.cxx b/direct/src/plugin_standalone/panda3d.cxx index 72126d168e..37e8378840 100644 --- a/direct/src/plugin_standalone/panda3d.cxx +++ b/direct/src/plugin_standalone/panda3d.cxx @@ -386,7 +386,6 @@ read_contents_file(Filename contents_filename, const string &download_url, ifstream in; contents_filename.set_text(); if (!contents_filename.open_read(in)) { - cerr << "Couldn't read " << contents_filename.to_os_specific() << "\n"; return false; }