GNOME Bugzilla – Bug 614207
Dims the screen when not on the active VT
Last modified: 2010-03-30 23:07:50 UTC
Created attachment 157338 [details] [review] 0001-Only-dim-the-screen-on-idle-when-on-the-active-conso.patch I tried logging in a second user on my laptop yesterday, and noticed that the screen dimmed immediately (I was on battery). After a little bit of debugging, I realised that it was g-p-m running in the inactive session which was doing this, because the session was idle. (Note that my hardware is being dimmed via xrandr) Now, I'm not sure whether the Xorg instance running on the inactive VT should be able to dim the screen or not, but I've attached a simple patch for g-p-m which checks if it is on the active console before dimming the screen on idle
Martin, does this look okay to you?
It means that we now have two connections to CK. It might be more elegant to disable the idle/background hooks entirely from the manager if we lose the active console (this might also save a few wakeups), but due to the current code structure this would be much harder to do. Logic-wise this patch looks fine to me, thanks Chris!
I'm wondering if it would be more appropriate for EggConsolekit to be a singleton? That would avoid the 2 connections then.
(In reply to comment #3) > I'm wondering if it would be more appropriate for EggConsolekit to be a > singleton? That would avoid the 2 connections then. Yes, this makes a lot of sense.
I've committed this now as commit 34f5a18