mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
minor tweaks
This commit is contained in:
parent
f6863b7b7a
commit
cf6a220cb7
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user