vino r1023 - in trunk: . server
- From: jwendell svn gnome org
- To: svn-commits-list gnome org
- Subject: vino r1023 - in trunk: . server
- Date: Tue, 16 Dec 2008 15:20:47 +0000 (UTC)
Author: jwendell
Date: Tue Dec 16 15:20:47 2008
New Revision: 1023
URL: http://svn.gnome.org/viewvc/vino?rev=1023&view=rev
Log:
2008-12-16 Jonh Wendell <jwendell gnome org>
* server/vino-server.c: Simulate a user activity through gnome-screensaver
when a client connects, thus not showing the screensaver animation
to the client. Closes #562548.
Modified:
trunk/ChangeLog
trunk/server/vino-server.c
Modified: trunk/server/vino-server.c
==============================================================================
--- trunk/server/vino-server.c (original)
+++ trunk/server/vino-server.c Tue Dec 16 15:20:47 2008
@@ -128,13 +128,14 @@
static gpointer parent_class;
-static void
-vino_server_lock_screen (VinoServer *server)
-{
#define GNOME_SCREENSAVER_BUS_NAME "org.gnome.ScreenSaver"
#define GNOME_SCREENSAVER_INTERFACE "org.gnome.ScreenSaver"
#define GNOME_SCREENSAVER_PATH "/org/gnome/ScreenSaver"
+static void
+vino_server_lock_screen (VinoServer *server)
+{
+
DBusGConnection *connection;
GError *error;
DBusGProxy *proxy;
@@ -164,10 +165,43 @@
g_object_unref (proxy);
dbus_g_connection_unref (connection);
+}
+
+static void
+vino_server_unlock_screen (void)
+{
+
+ DBusGConnection *connection;
+ GError *error;
+ DBusGProxy *proxy;
+
+ dprintf(DBUS, "Unlocking screen via gnome-screensaver\n");
+
+ error = NULL;
+ connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+ if (!connection)
+ {
+ g_printerr (_("Failed to open connection to bus: %s\n"),
+ error->message);
+ g_error_free (error);
+ return;
+ }
+
+ proxy = dbus_g_proxy_new_for_name (connection,
+ GNOME_SCREENSAVER_BUS_NAME,
+ GNOME_SCREENSAVER_PATH,
+ GNOME_SCREENSAVER_INTERFACE);
+
+ dbus_g_proxy_call_no_reply (proxy, "SimulateUserActivity", G_TYPE_INVALID);
+
+ g_object_unref (proxy);
+ dbus_g_connection_unref (connection);
+
+}
+
#undef GNOME_SCREENSAVER_BUS_NAME
#undef GNOME_SCREENSAVER_INTERFACE
#undef GNOME_SCREENSAVER_PATH
-}
void
vino_server_set_disable_background (VinoServer *server,
@@ -199,6 +233,8 @@
{
vino_status_icon_add_client (server->priv->icon, client);
+ vino_server_unlock_screen ();
+
if (vino_server_get_disable_background (server))
vino_background_draw (FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]