From owner-freebsd-hackers Sun Nov 1 05:19:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA06126 for freebsd-hackers-outgoing; Sun, 1 Nov 1998 05:19:15 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ocean.campus.luth.se (ocean.campus.luth.se [130.240.194.116]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA06119 for ; Sun, 1 Nov 1998 05:19:13 -0800 (PST) (envelope-from karpen@ocean.campus.luth.se) Received: (from karpen@localhost) by ocean.campus.luth.se (8.9.1/8.9.1) id OAA21309; Sun, 1 Nov 1998 14:13:36 +0100 (CET) (envelope-from karpen) From: Mikael Karpberg Message-Id: <199811011313.OAA21309@ocean.campus.luth.se> Subject: Re: kld screensavers In-Reply-To: from Doug Rabson at "Oct 30, 98 09:44:35 am" To: dfr@nlsystems.com (Doug Rabson) Date: Sun, 1 Nov 1998 14:13:36 +0100 (CET) Cc: yokota@zodiac.mech.utsunomiya-u.ac.jp, jhay@mikom.csir.co.za, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Doug Rabson: > Thats more or less what I was suggesting. Simple screen savers wouldn't > even need an event handler. Maybe something like: [suggestion removed] While this is being discussed, I'd like to bring something up that I've wanted for a long time, and brought up before. Why not make to so that each screensaver register itself with a timeout, a priority and a flag that says if it's fallthrough or not? That way you can have multiple screensavers installed, and they get called as approriate. I haven't looked at the current code, I'm affraid, so go easy on me. Example: Three screensavers: (say default prio is 5) lock: prio 1, 10 minutes, fallthrough (Demands password to release screen) green: prio 4, 20 minutes (Turn screen off) stars: prio 5, 5 minutes (Twinkle, twinkle, little star) Right... So this happens if you idle: After 5 minutes the stars saver kicks in and the screen gets full of stars. After 2 minutes you press a key and the screen is returned to normal. After 5 more minutes the stars saver kicks back in. After 5 more minutes the lock saver kicks in, steals the "release" event, and then does nothing... Stars saver "twinkle" routine is still getting called as usual, but lock's "twinkle" routine gets called first, and just returns "ok to fallthrough", which make the stars one continue. After 10 more minutes the green saver kicks in, and demands to be run. It gets scheduled after lock, because of its prio and therefor the screen is turned off, since lock's "twinkle" is still returning "ok to fallthrough", and the fallthrough now calls "green", which just sees to that the screen is off, and keeps off. Now you're back from your coffee break, hit a key, and the lock saver gets the event to return screen to normal. It steals the display and asks for a password, and doesn't give the screen back until you type the right password. End example... Now, thinking about this a bit I can see a problem with a lock saver and the chain of calls that have to be done to wake up, etc... But I hope you see the picture, and maybe have a good architecture to solve this. It sure would be very nice. I don't know my way around syscons's internals to do the architecturing myself, however. /Mikael To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message