lockdown: Add define for disable-log-out
gsm: Enforce disable-user-switching lockdown setting

Based on gnome-session commit: 	899fe6b1628cd2d86931632f72512bca04d2aeaf
From: Vincent Untz <vuntz@gnome.org>
gsm: Support disable-user-switching lockdown setting in logout dialog

Based on gnome-session commit:fa30b73948c50c2493e19565b4e3b14b40f985e1
From: Vincent Untz <vuntz@gnome.org>
gsm: Fix race condition in idle monitor

In _xsync_alarm_set(), the positive and negative transition intervals
are set to the same value. However, the SYNC extension defines the
positive transition as set when the counter goes from strictly below the
threshold to greater than or equal to the threshold and similarly a
negative transition is triggered when the counter goes form strictly
greater than the threshold to less than or equal to the threshold.

Thus in the current set up there's a chance that the positive transition
can trigger, marking the session as idle, and some user input occur on
the same click so the IDLETIME count will hit the threshold but not go
above so the negative transition will not trigger. Thus the session will
not be marked as active.

The negative transition threshold should be set to 1ms less than the
positive transition to ensure that it always fires.

Based on gnome-session commit: 861313503a741f0129611ca005cf6d7c27124b54
From: Christopher Halse Rogers <chalserogers@gmail.com>
Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=627903
Add missing #include <config.h>

Based on gnome-session commit: b9fa0c8c9ff57f704d83dfd1f7b4ae0c19280edf
From: Kjartan Maraas <kmaraas@gnome.org>
gsm: Do not assume XSMP clients set the SmProgram property

Since setting some properties can be skipped, there is no guarantee that
SmProgram is set.

Based on gnome-session commit: 35a9945ae1339297de2e0eeff543e876186dea6e
From: Vincent Untz <vuntz@gnome.org>
Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=590828
gsm: Do not uselessly duplicate a string

Based on gnome-session commit: 9f25b7599ba016f8da7275afa4c3f8e194678734
From: Vincent Untz <vuntz@gnome.org>
gsm: Add gtk-doc comments for two GsmClient functions

Based on gnome-session commit: ebf9afaa10c7903694df5b2fee635a6dde5213a6
From: Vincent Untz <vuntz@gnome.org>
capplet: remove unused variable
capplet: Do not pretend we need the egg code here

Based on gnome-session commit: 0e45c5c15d0ffedf90af3ea401288d6a0f758383
From: Vincent Untz <vuntz@gnome.org>
Add an IsSessionRunning method

This gives clients who missed the SessionRunning signal a chance
to find out if the session has entered the running phase, and
lets us avoid race conditions.

Based on gnome-session commit: b59d358796343f81b31d4a398998faedd20b8f4b
From: Matthias Clasen <mclasen@redhat.com>
Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=636229
Fix usage of %lld for 64-bit formats

Scott already did some work on this, update to how gnome-session handles this.

Based on gnome-session commit: b2ad0abf2263b4af044388035df8993db9223a1b
From: Owen W. Taylor <otaylor@fishsoup.net>
gsm: Never mark as handled the Disconnected signal from dbus

Disconnected is emitted when dbus is quitting. And all the dbus filters
might be interested in this signal, so never mark it as handled when we
look at it.

Based on gnome-commit: 67dd879fbe62bc28d3bbc48b88c3842e2cb827e8
From: Vincent Untz <vuntz@gnome.org>
gsm: Refuse to install an idle timeout of 0 seconds

This was making gnome-screensaver fade and blank the screen as soon as you
stopped moving the mouse/using the keyboard when the timeout is set to 0.

Based on gnome-session commit: be627c10409129408e135925d5dd83ae2d554fa0
From: Rodrigo Moya <rodrigo@gnome-db.org>

Original bug: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/863038
Add a commandline wrapper to inhibit idle

Based on gnome-commit: fcdbf2b36b184f10239ac7a81cb3c88b4c5ed477
From: Matthias Clasen <mclasen@redhat.com>