No interaction in X11 Fullscreen mode
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The interaction does not work if the renderwindow is set to fullscreen on X11.
The problem was first reported on the vtkusers list: http://www.vtk.org/pipermail/vtkusers/2009-June/101148.html
I have been able to reproduce it with the following minimal code. There are 4 lines where we attempt to call FullScreenOn(). Each of them is called once in 4 different tests. The first 3 FullScreenOn calls don't show the issue.
Call 1 and 2 are canceled by the later call to SetSize(). Call 3 gives a fullscreen window with decoration and interaction. Call 4 gives a fullscreen window without decoration and a black screen. We can see the mouse cursor moving. It shows there is no rendering because in the code, the background is set to a green color.
Tried on Ubuntu 9.04 x86_64 with nVidia Quadro FX 3600M, 512 MB, driver 180.44.
#include "vtkTestUtilities.h"
#include "vtkRegressionTestImage.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderWindow.h"
#include "vtkRenderer.h"
#include "vtkActor.h"
#include "vtkPolyDataMapper.h"
#include "vtkConeSource.h"
int TestFullScreen(int argc, char* argv[])
{
vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
// renWin->FullScreenOn(); // 1
iren->SetRenderWindow(renWin);
// renWin->FullScreenOn(); // 2
renWin->Delete();
vtkRenderer *renderer = vtkRenderer::New();
renWin->AddRenderer(renderer);
renderer->Delete();
vtkConeSource *coneSource=vtkConeSource::New();
vtkPolyDataMapper *coneMapper=vtkPolyDataMapper::New();
coneMapper->SetInputConnection(coneSource->GetOutputPort());
coneSource->Delete();
vtkActor *coneActor=vtkActor::New();
coneActor->SetMapper(coneMapper);
coneMapper->Delete();
renderer->AddActor(coneActor);
coneActor->Delete();
renderer->SetBackground(0.1,0.3,0.0);
renWin->SetSize(200,200); // SetSize override previous calls to FullScreenOn
// renWin->FullScreenOn(); // 3
renWin->Render();
renWin->FullScreenOn(); // 4
int retVal = vtkRegressionTestImage( renWin );
if ( retVal == vtkRegressionTester::DO_INTERACTOR)
{
iren->Start();
}
iren->Delete();
return !retVal;
}