[totem/gnome-3-6] browser-plugin: Make screensaver work in browser



commit 9f10720ef659e25fc810b468a80bdabbbd7c7f23
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Oct 11 08:45:04 2012 +0200

    browser-plugin: Make screensaver work in browser
    
    We need to register the application in addition to creating it.

 browser-plugin/totem-plugin-viewer.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 32bd2e7..a00e23f 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -2258,9 +2258,15 @@ int main (int argc, char **argv)
 
 	emb = g_object_new (TOTEM_TYPE_EMBEDDED,
 			    "application-id", svcname,
-			    "flags", G_APPLICATION_FLAGS_NONE,
+			    "flags", G_APPLICATION_NON_UNIQUE,
 			    NULL);
 
+	if (g_application_register (G_APPLICATION (emb), NULL, &e) == FALSE) {
+		g_warning ("Failed to register application: %s", e->message);
+		g_error_free (e);
+		return 1;
+	}
+
 	emb->state = TOTEM_STATE_INVALID;
 	emb->width = -1;
 	emb->height = -1;



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