Browse Source

set_parent_window(0) means NULL

David Rose 16 years ago
parent
commit
dc3668bf0e

+ 2 - 2
panda/src/display/nativeWindowHandle.cxx

@@ -102,7 +102,7 @@ get_int_handle() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void NativeWindowHandle::IntHandle::
 void NativeWindowHandle::IntHandle::
 output(ostream &out) const {
 output(ostream &out) const {
-  out << _handle;
+  out << "(" << _handle << ")";
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -112,7 +112,7 @@ output(ostream &out) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void NativeWindowHandle::SubprocessHandle::
 void NativeWindowHandle::SubprocessHandle::
 output(ostream &out) const {
 output(ostream &out) const {
-  out << _filename;
+  out << "(" << _filename << ")";
 }
 }
 
 
 #if defined(HAVE_X11) && !defined(CPPPARSER)
 #if defined(HAVE_X11) && !defined(CPPPARSER)

+ 6 - 2
panda/src/display/windowProperties.cxx

@@ -225,8 +225,12 @@ clear() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void WindowProperties::
 void WindowProperties::
 set_parent_window(size_t parent) {
 set_parent_window(size_t parent) {
-  PT(WindowHandle) handle = NativeWindowHandle::make_int(parent);
-  set_parent_window(handle);
+  if (parent == 0) {
+    set_parent_window((WindowHandle *)NULL);
+  } else {
+    PT(WindowHandle) handle = NativeWindowHandle::make_int(parent);
+    set_parent_window(handle);
+  }
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////