Summary: | race condition when terminating screensaver | ||
---|---|---|---|
Product: | [Unmaintained] kscreensaver | Reporter: | Rick Alther <alther> |
Component: | general | Assignee: | kscreensaver bugs tracking <kscreensaver-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | l.lunak, tvrtko.ursulin |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Rick Alther
2004-05-11 23:40:06 UTC
*** Bug 81255 has been marked as a duplicate of this bug. *** #81255 is basically the same, about notification when the screensaver exits. One additional idea. Maybe KScreenSaver class should support some additional flags when invoking the screensaver so that one can differentiate between real saver start, and saver preview. Why you might ask? Because my screensaver turns off the LCD display on my laptop. It happend even when selecting it in configuration module which is really not-so-cool. :) I personally don't think things like turning LCD display off belong to the actual screensavers. The screensavers are just programs painting silly things. Maybe it'd be better if there was some kind of notification about starting/finishing screensaving. I agree with Lubos. Power management should be configured as part of the overall desktop/OS, not as part of a specific screen saver. If I configure the monitor to power off after 2 hours, I expect the monitor/LCD to power off after two hours of inactivity, regardless what screensaver I have configured (or even if I don't have a screen saver configured). My suggested solution is a quick and easy one and fits easily into the existing code with no design change. Once this is implemented, the screen saver process can properly shut down. If you're really interested, you can tell if you are running as a screen saver or not by comparing the size() of the window you are drawing to to the screen size. If they're the same, you're in screen saver mode, if not, you're in demo mode (or running in some other window). Not the most pretty way of doing things, but it can all be done fairly easily. That doesn't mean there isn't a better way to do this, but a different way of doing things likely requires a slight design change and more work. SVN commit 653142 by ossi: give the hack a few seconds to exit. BUG: 81380 M +4 -0 lockprocess.cc --- branches/KDE/3.5/kdebase/kdesktop/lock/lockprocess.cc #653141:653142 @@ -857,6 +857,10 @@ if (mHackProc.isRunning()) { mHackProc.kill(); + if (!mHackProc.wait(10)) + { + mHackProc.kill(SIGKILL); + } } } |