Commit c4407906 authored by Ken Martin's avatar Ken Martin
Browse files

fixed up GetScreenSize method

parent 766e1bd9
......@@ -31,6 +31,16 @@ vtkXRenderWindow::vtkXRenderWindow()
// Get the size of the screen in pixels
int *vtkXRenderWindow::GetScreenSize()
{
// get the default display connection
if (!this->DisplayId)
{
this->DisplayId = XOpenDisplay((char *)NULL);
if (this->DisplayId == NULL)
{
vtkErrorMacro(<< "bad X server connection.\n");
}
}
this->ScreenSize[0] =
DisplayWidth(this->DisplayId, DefaultScreen(this->DisplayId));
this->ScreenSize[1] =
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment