Commit 20b0047a authored by Dan Lipsa's avatar Dan Lipsa

Revert "Set the correct window size if initial size bigger than screen."

This reverts commit c9fa0226.
parent 49180824
......@@ -709,22 +709,15 @@ void vtkXOpenGLRenderWindow::CreateAWindow()
vtkDebugMacro(" Mapping the xwindow\n");
XMapWindow(this->DisplayId, this->WindowId);
XSync(this->DisplayId,False);
// Wait for the MapNotify event
while(true)
{
XEvent e;
XNextEvent(this->DisplayId, &e);
if (e.type == MapNotify)
{
break;
}
}
XGetWindowAttributes(this->DisplayId,
this->WindowId,&winattr);
// if the specified window size is bigger than the screen size,
// we have to reset the window size to the screen size
width = winattr.width;
height = winattr.height;
// guarantee that the window is mapped before the program continues
// on to do the OpenGL rendering.
while (winattr.map_state == IsUnmapped)
{
XGetWindowAttributes(this->DisplayId,
this->WindowId,&winattr);
}
this->Mapped = 1;
}
// free the visual info
......
......@@ -367,23 +367,11 @@ void vtkXRenderWindowInteractor::Initialize()
XMapWindow(this->DisplayId, XtWindow(this->Top));
}
XSync(this->DisplayId,False);
// Wait for the MapNotify event
if (ren->GetShowWindow())
{
while(true)
{
XEvent e;
XNextEvent(this->DisplayId, &e);
if (e.type == MapNotify)
{
break;
}
}
}
}
else
{
XWindowAttributes attribs;
XtRealizeWidget(this->Top);
XSync(this->DisplayId,False);
ren->SetWindowId(XtWindow(this->Top));
......@@ -393,21 +381,19 @@ void vtkXRenderWindowInteractor::Initialize()
XMapWindow(this->DisplayId, XtWindow(this->Top));
}
XSync(this->DisplayId,False);
}
XWindowAttributes attribs;
// Find the current window size
XGetWindowAttributes(this->DisplayId,
XtWindow(this->Top), &attribs);
size[0] = attribs.width;
size[1] = attribs.height;
ren->SetSize(size[0], size[1]);
// Find the current window size
XGetWindowAttributes(this->DisplayId,
XtWindow(this->Top), &attribs);
size[0] = attribs.width;
size[1] = attribs.height;
ren->SetSize(size[0], size[1]);
}
this->WindowId = XtWindow(this->Top);
ren->Start();
this->Enable();
this->Size[0] = size[0];
this->Size[1] = size[1];
}
......
Markdown is supported
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