[yelp/yelp-3-0] [yelp-application] Present existing windows on current workspace



commit a7f6c4f4feb3b24a75049076579c2a7d089890ac
Author: Shaun McCance <shaunm gnome org>
Date:   Wed Mar 17 09:03:04 2010 -0500

    [yelp-application] Present existing windows on current workspace

 src/yelp-application.c |   12 ++++++++++--
 src/yelp-window.c      |    1 -
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/yelp-application.c b/src/yelp-application.c
index dbe2b70..1e0dc57 100644
--- a/src/yelp-application.c
+++ b/src/yelp-application.c
@@ -214,7 +214,8 @@ yelp_application_run (YelpApplication  *app,
                                            "org.gnome.Yelp");
         if (!dbus_g_proxy_call (proxy, "LoadUri", &error,
                                 G_TYPE_STRING, newuri,
-                                G_TYPE_UINT, GDK_CURRENT_TIME,
+                                G_TYPE_UINT,
+                                gtk_get_current_event_time (),
                                 G_TYPE_INVALID, G_TYPE_INVALID)) {
             g_warning ("Unable to notify existing process: %s\n", error->message);
             g_error_free (error);
@@ -229,7 +230,7 @@ yelp_application_run (YelpApplication  *app,
                                          "/org/gnome/Yelp",
                                          G_OBJECT (app));
 
-    yelp_application_load_uri (app, uri, GDK_CURRENT_TIME, NULL);
+    yelp_application_load_uri (app, uri, gtk_get_current_event_time (), NULL);
 
     gtk_main ();
 
@@ -265,6 +266,7 @@ application_uri_resolved (YelpUri             *uri,
 {
     YelpWindow *window;
     gchar *doc_uri;
+    GdkWindow *gdk_window;
     YelpApplicationPrivate *priv = GET_PRIV (data->app);
 
     doc_uri = yelp_uri_get_document_uri (uri);
@@ -286,6 +288,12 @@ application_uri_resolved (YelpUri             *uri,
     yelp_window_load_uri (window, uri);
 
     gtk_widget_show_all (GTK_WIDGET (window));
+
+    /* Metacity no longer does anything useful with gtk_window_present */
+    gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+    if (gdk_window)
+        gdk_x11_window_move_to_current_desktop (gdk_window);
+
     gtk_window_present_with_time (GTK_WINDOW (window), data->timestamp);
 
     g_free (data);
diff --git a/src/yelp-window.c b/src/yelp-window.c
index 7e12164..5a9ccd6 100644
--- a/src/yelp-window.c
+++ b/src/yelp-window.c
@@ -171,7 +171,6 @@ yelp_window_init (YelpWindow *window)
     GError *error = NULL;
     YelpWindowPrivate *priv = GET_PRIV (window);
 
-    gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_UTILITY);
     gtk_window_set_default_size (GTK_WINDOW (window), 520, 580);
 
     vbox = gtk_vbox_new (FALSE, 0);



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