You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Monday, February 27th 2012, 2:40pm

[SOLVED] QWSScreenSaver: How to ignore key/mouse presses?

Hi all!

I just implemented a screen saver based on QWSScreenSaver and noticed it doesn't swallow the restoring key or mouse clocks by default, thus they are promoted to the underlying widgets that have just become visible; this behaviour is usually not wanted.
I looked for a straightforward method to suppress these events, but all I was able to come up with was installing an eventFilter on QApplication::instance() to intercept the events in my class and ignore them (this implies deriving my screen saver from QObject). After this has happened the filter is removed, until the next time. This works acceptably, however I've got the feeling that there should be a more elegant way. Does anyone have any ideas?


This post has been edited 1 times, last edit by "Murphy" (Jun 27th 2012, 1:55pm) with the following reason: Set solved flag.


Wednesday, June 27th 2012, 1:54pm

[SOLVED] QWSScreenSaver: How to ignore key/mouse presses?

It's been a while, but I found the proper solution; it hides behind QWSServer::setScreenSaverBlockLevel(). No need for a workaround.