Re: [gpm] Re: gnome-screensaver 0.0.23

Hi Jaap,

Sorry for the delay.

Jaap Haitsma wrote:
I don't really see why gnome power manager should depend on gnome-screensaver for getting the idle time, because as a user for some reason I might not want to install gnome-screensaver.

Blasphemy! But seriously, I don't think this is a problem for a few reasons.

g-p-m would not necessarily depend on gnome-screensaver. It would depend on something that implements a similar D-Bus interface, or more specifically, sends a SessionIdleChanged signal. This would be further reduced if we move to a org.freedesktop D-Bus namespace, eventually.

Anyway dependencies aren't really bad - they are a side effect of proper software layering and modularity. As far as dependencies go, D-Bus relationships are as loose as they come.

A better solution is to have one C file exporting the function

int get_keyboard_mouse_idle_time ()

If that file is part of gnome-screensaver, gnome-power-manager would just copy that file and put it in a cut-n-paste directory like the way
it's currently done with libegg files

There are a few reasons why this would be so hot. We don't want g-s and g-p-m disagreeing about session idleness. So, optimally idleness is detected and defined in one place. Also, the way that this idle detection stuff works is that it selects for events from every window in the session and polls the mouse every so often. It wouldn't be very efficient to have multiple applications doing this sort of thing. We also don't want to be fixing bugs in this somewhat complicated code in more places than we need to.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]