mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
hidden plugins
This commit is contained in:
parent
8db00b4f74
commit
f3751431b5
@ -16,7 +16,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
static const bool debug_xml_output = false;
|
static const bool debug_xml_output = true;
|
||||||
|
|
||||||
#define DO_BINARY_XML 1
|
#define DO_BINARY_XML 1
|
||||||
|
|
||||||
|
@ -184,7 +184,9 @@ set_wparams(const P3DWindowParams &wparams) {
|
|||||||
nout << "set_wparams, _session = " << _session << "\n";
|
nout << "set_wparams, _session = " << _session << "\n";
|
||||||
_got_wparams = true;
|
_got_wparams = true;
|
||||||
_wparams = wparams;
|
_wparams = wparams;
|
||||||
|
nout << "set window_type = " << _wparams.get_window_type() << "\n";
|
||||||
|
|
||||||
|
if (_wparams.get_window_type() != P3D_WT_hidden) {
|
||||||
// Update or create the splash window.
|
// Update or create the splash window.
|
||||||
if (!_instance_window_opened) {
|
if (!_instance_window_opened) {
|
||||||
if (_splash_window == NULL) {
|
if (_splash_window == NULL) {
|
||||||
@ -226,6 +228,7 @@ set_wparams(const P3DWindowParams &wparams) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
}
|
||||||
|
|
||||||
// Update the instance in the sub-process.
|
// Update the instance in the sub-process.
|
||||||
if (_session != NULL) {
|
if (_session != NULL) {
|
||||||
|
@ -257,10 +257,10 @@ paint_window() {
|
|||||||
PaintRect(&rdone);
|
PaintRect(&rdone);
|
||||||
EraseRect(&rneed);
|
EraseRect(&rneed);
|
||||||
|
|
||||||
if (!_install_label.empty()) {
|
|
||||||
RGBColor black = { 0, 0, 0 };
|
RGBColor black = { 0, 0, 0 };
|
||||||
RGBForeColor(&black);
|
RGBForeColor(&black);
|
||||||
|
|
||||||
|
if (!_install_label.empty()) {
|
||||||
TextFont(0);
|
TextFont(0);
|
||||||
TextFace(bold);
|
TextFace(bold);
|
||||||
TextMode(srcOr);
|
TextMode(srcOr);
|
||||||
|
@ -1064,8 +1064,18 @@ send_window() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
P3D_window_type window_type = P3D_WT_embedded;
|
||||||
|
if (_window.window == NULL) {
|
||||||
|
// No parent window: it must be a hidden window.
|
||||||
|
window_type = P3D_WT_hidden;
|
||||||
|
} else if (_window.width == 0 || _window.height == 0) {
|
||||||
|
// No size: hidden.
|
||||||
|
window_type = P3D_WT_hidden;
|
||||||
|
}
|
||||||
|
nout << "window_type = " << window_type << "\n";
|
||||||
|
|
||||||
P3D_instance_setup_window
|
P3D_instance_setup_window
|
||||||
(_p3d_inst, P3D_WT_embedded,
|
(_p3d_inst, window_type,
|
||||||
x, y, _window.width, _window.height,
|
x, y, _window.width, _window.height,
|
||||||
parent_window);
|
parent_window);
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <signal.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static ofstream logfile;
|
static ofstream logfile;
|
||||||
ostream *nout_stream = &logfile;
|
ostream *nout_stream = &logfile;
|
||||||
|
|
||||||
@ -129,6 +133,12 @@ NP_Initialize(NPNetscapeFuncs *browserFuncs,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// On Mac, we'd better ignore SIGPIPE, or this signal will shut down
|
||||||
|
// the application if the plugin exits unexpectedly.
|
||||||
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
#endif // __APPLE__
|
||||||
|
|
||||||
return NPERR_NO_ERROR;
|
return NPERR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user