[Bug 66492] keuphoria occasionally only using quarter of screen

Ivo Anjo knuckles at gmail.com
Tue Mar 31 17:24:31 UTC 2009


https://bugs.kde.org/show_bug.cgi?id=66492





--- Comment #23 from Ivo Anjo <knuckles gmail com>  2009-03-31 19:24:28 ---
Created an attachment (id=32504)
 --> (http://bugs.kde.org/attachment.cgi?id=32504)
Fix

Ok so I finally got fed up with this bug this week, and decided to not rest
until it's solved :)

My analysis of the problem is: most screensavers just subclass KScreenSaver,
and do their stuff on paintEvent(). Opengl screensavers on the other hand, need
to work with a QGlWidget, instead of QWidget which is what KScreenSaver is, so
they create a QGlWidget, and then use XEmbed to place that widget inside a
KScreenSaver. The problem is that by doing this using X11 calls, the QGlWidget
isn't alerted of changes on his parent in this case (because it has no parent,
unlike normal widgets).

So my solution is for KScreenSaver to keep a pointer to the widget when embed()
gets called, and to propagate resizeEvents to this widget when it receives
them.

The attached patch implements this.

This patch fixes all the opengl screensavers I tested: kflux, kfountain,
ksolarwinds, kwave, keuphoria and kgravity. To test it just start any
screensaver from the shell (for example kflux.kss) and then resize the window:
you'll notice that without the patch the "opengl" view is never resized.

I haven't commited this yet, but if I can get some confirmations that it's all
ok (including trying with --setup and inside systemsettings), I'll commit this
to trunk and to branch. Thanks in advance :)

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the pkg-kde-bugs-fwd mailing list