Bug 81255

Summary: Notification of screensaver termination
Product: kscreensaver Reporter: Tvrtko A. Ursulin <tvrtko.ursulin>
Component: generalAssignee: kscreensaver bugs tracking <kscreensaver-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: alther, l.lunak
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tvrtko A. Ursulin 2004-05-10 16:00:07 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    SuSE RPMs
OS:          Linux

I was trying to write an KRadeonSaver screensaver which should turn off the backlight on laptops with Radeon Mobility GPU-s. However, it seems to me that currently there is no mechanism which would signal the screensaver when it should (or is about to) exit. 

I have tried to turn the backlight on in destructor of my class derived from KScreenSaver class, but I have found that it isn't called when terminating the screensaver.

Am I missing something, or this can become an legitimate feature request? :)
Comment 1 Rick Alther 2004-05-11 23:49:21 UTC
It's not very well documented (as in, not at all), but what when screen saver ends, it sends a SIGTERM signal to the actual screen saver process (your process).  You need to implement a SIGTERM handler to catch the signal and do whatever it is you need to do before ending.

Having said that, there is a serious race condition bug that I just reported (bug 81380) which may very well kill your process before you have a chance to completely clean up.  
Comment 2 Lubos Lunak 2004-05-19 11:23:12 UTC

*** This bug has been marked as a duplicate of 81380 ***