set_parent_window(0) means NULL

This commit is contained in:
David Rose 2009-11-02 20:47:29 +00:00
parent c7e7cc8c1c
commit dc3668bf0e
2 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -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); if (parent == 0) {
set_parent_window(handle); set_parent_window((WindowHandle *)NULL);
} else {
PT(WindowHandle) handle = NativeWindowHandle::make_int(parent);
set_parent_window(handle);
}
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////