diff options
author | Shaun McCance <shaunm@gnome.org> | 2014-06-16 17:15:38 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2014-06-16 17:15:38 -0400 |
commit | 5fedb1eab1ea41fc87c0416eb91344c4cf6af7f7 (patch) | |
tree | 962cd1b2d807a7d8e3967a97c0ab7c541c2ed330 /src | |
parent | 780c67e4e48470457223fe03ae43a6017254fa1d (diff) | |
parent | 4d9d8742358c66e1d4f0efa9f2a83d8cef763caf (diff) | |
download | yelp-5fedb1eab1ea41fc87c0416eb91344c4cf6af7f7.tar.gz |
Merge branch 'master' into new-aday-design
Conflicts:
src/yelp-window.c
Diffstat (limited to 'src')
-rw-r--r-- | src/yelp-application.c | 29 | ||||
-rw-r--r-- | src/yelp-window.c | 2 |
2 files changed, 20 insertions, 11 deletions
diff --git a/src/yelp-application.c b/src/yelp-application.c index 42deb074..20c8266a 100644 --- a/src/yelp-application.c +++ b/src/yelp-application.c @@ -28,7 +28,9 @@ #include <gio/gsettingsbackend.h> #include <glib/gi18n.h> #include <gtk/gtk.h> +#ifdef GDK_WINDOWING_X11 #include <gdk/gdkx.h> +#endif #include <stdlib.h> #include "yelp-bookmarks.h" @@ -466,18 +468,25 @@ application_uri_resolved (YelpUri *uri, /* 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); - /* Ensure we actually present the window when invoked from the command - * line. This is somewhat evil, but the minor evil of Yelp stealing - * focus (after you requested it) is outweighed for me by the major - * evil of no help window appearing when you click Help. - */ - if (data->timestamp == 0) - data->timestamp = gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (window))); +#ifdef GDK_WINDOWING_X11 + if (GDK_IS_X11_WINDOW (gdk_window)){ + if (gdk_window) + gdk_x11_window_move_to_current_desktop (gdk_window); + + /* Ensure we actually present the window when invoked from the command + * line. This is somewhat evil, but the minor evil of Yelp stealing + * focus (after you requested it) is outweighed for me by the major + * evil of no help window appearing when you click Help. + */ + if (data->timestamp == 0) + data->timestamp = gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (window))); - gtk_window_present_with_time (GTK_WINDOW (window), data->timestamp); + gtk_window_present_with_time (GTK_WINDOW (window), data->timestamp); + } + else +#endif + gtk_window_present (GTK_WINDOW (window)); g_object_unref (uri); g_free (data); diff --git a/src/yelp-window.c b/src/yelp-window.c index 3ffaccba..6cac2908 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -259,7 +259,7 @@ yelp_window_dispose (GObject *object) YelpWindowPrivate *priv = GET_PRIV (object); if (priv->bookmarks_changed) { - g_source_remove (priv->bookmarks_changed); + g_signal_handler_disconnect (priv->application, priv->bookmarks_changed); priv->bookmarks_changed = 0; } |