mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
build on linux
This commit is contained in:
parent
13877e26b1
commit
f9864e18d1
@ -33,8 +33,8 @@
|
|||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
P3DX11SplashWindow::
|
P3DX11SplashWindow::
|
||||||
P3DX11SplashWindow(P3DInstance *inst) :
|
P3DX11SplashWindow(P3DInstance *inst, bool make_visible) :
|
||||||
P3DSplashWindow(inst)
|
P3DSplashWindow(inst, make_visible)
|
||||||
{
|
{
|
||||||
// Init for parent process
|
// Init for parent process
|
||||||
_subprocess_pid = -1;
|
_subprocess_pid = -1;
|
||||||
@ -80,6 +80,25 @@ set_wparams(const P3DWindowParams &wparams) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: P3DX11SplashWindow::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 P3DX11SplashWindow::
|
||||||
|
set_visible(bool visible) {
|
||||||
|
P3DSplashWindow::set_visible(visible);
|
||||||
|
|
||||||
|
TiXmlDocument doc;
|
||||||
|
TiXmlElement *xcommand = new TiXmlElement("command");
|
||||||
|
xcommand->SetAttribute("cmd", "set_visible");
|
||||||
|
xcommand->SetAttribute("visible", (int)visible);
|
||||||
|
doc.LinkEndChild(xcommand);
|
||||||
|
write_xml(_pipe_write, &doc, nout);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: P3DX11SplashWindow::set_image_filename
|
// Function: P3DX11SplashWindow::set_image_filename
|
||||||
// Access: Public, Virtual
|
// Access: Public, Virtual
|
||||||
@ -643,6 +662,17 @@ receive_command() {
|
|||||||
if (strcmp(cmd, "exit") == 0) {
|
if (strcmp(cmd, "exit") == 0) {
|
||||||
_subprocess_continue = false;
|
_subprocess_continue = false;
|
||||||
|
|
||||||
|
} else if (strcmp(cmd, "set_visible") == 0) {
|
||||||
|
int visible = 0;
|
||||||
|
if (xcommand->Attribute("visible", &visible) != NULL) {
|
||||||
|
_visible = visible;
|
||||||
|
if (_visible) {
|
||||||
|
XMapWindow(_display, _window);
|
||||||
|
} else {
|
||||||
|
XUnmapWindow(_display, _window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (strcmp(cmd, "set_image_filename") == 0) {
|
} else if (strcmp(cmd, "set_image_filename") == 0) {
|
||||||
const string *image_filename = xcommand->Attribute(string("image_filename"));
|
const string *image_filename = xcommand->Attribute(string("image_filename"));
|
||||||
int image_placement;
|
int image_placement;
|
||||||
@ -798,7 +828,9 @@ make_window() {
|
|||||||
(_display, parent, x, y, _win_width, _win_height,
|
(_display, parent, x, y, _win_width, _win_height,
|
||||||
0, depth, InputOutput, dvisual, attrib_mask, &wa);
|
0, depth, InputOutput, dvisual, attrib_mask, &wa);
|
||||||
|
|
||||||
XMapWindow(_display, _window);
|
if (_visible) {
|
||||||
|
XMapWindow(_display, _window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
virtual ~P3DX11SplashWindow();
|
virtual ~P3DX11SplashWindow();
|
||||||
|
|
||||||
virtual void set_wparams(const P3DWindowParams &wparams);
|
virtual void set_wparams(const P3DWindowParams &wparams);
|
||||||
|
virtual void set_visible(bool visible);
|
||||||
virtual void set_image_filename(const string &image_filename,
|
virtual void set_image_filename(const string &image_filename,
|
||||||
ImagePlacement image_placement);
|
ImagePlacement image_placement);
|
||||||
virtual void set_install_label(const string &install_label);
|
virtual void set_install_label(const string &install_label);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user