PDA

View Full Version : Problem displaying QGLWidget in Full Sceen Mode on Ubuntu



Barry79
22nd April 2009, 16:25
Hi,

I'm working with two screens. I display my Gui on the first monitor and the QGLWidget window in the second. Both are shown in full screen mode.

Lets say that I'm navigating within my QGLWidget window using my mouse and I then click on a button on the GUI, for some reason the QGLWidget:: paintGL() function is being called and the whole QGLWidget window is being repainted. It seems that the GUI window is also repainted since the buttons disappear for a second or so. If I then click on the QGLWidget window again, QGLWidget:: paintGL() will again be called and the window is once again repainted.

If I display the GUI and QGLWidget window using show() instead of showFullScreen(), this does not happen. I.e. QGLWidget:: paintGL() is not called.

How can I stop QGLWidget:: paintGL() being called in fullScreenMode?

My two windows are displayed along the following lines -

mainWidget.showFullScreen();
mainWidget.setGeometry(QApplication::desktop()->availableGeometry(0));

glWidget.showFullScreen();
glWidget.setGeometry(QApplication::desktop()->availableGeometry(1));

Another annoying thing is that the problem can disappear all of a sudden, only reappearing when I restart my computer.

I've made a simple example to demonstrate my problem. I've put a sleep of 1 second within paintGL() to demonstate the problem.

http://www.savefile.com/files/2082861

I'm working on the latest version of Ubuntu, but I've tested this problem on earlier versions with no luck. My Graphics card is running NVIDIA Driver 173.14.12.

I'm really hoping someone can help since I've had this problem for quite some time and I like to solve it.

Thanks for your help,

Barry

Barry79
23rd April 2009, 09:05
I think I might have fixed the problem. Under -

System >> Preference >> Appearance >> Visual Effects

I've changed the default value from Normal to None.

Now it seems that GlPaint is not being called as I switch focus between the GUI and GL windows. Even after restarting my computer...

Any comments?