[evince] Fix a crash when running with Broadway GDK backend
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] Fix a crash when running with Broadway GDK backend
- Date: Mon, 9 Apr 2012 06:41:10 +0000 (UTC)
commit ef6d1fc7f6d38bbe940665132e9a52f67c676443
Author: justin <justin jdjlab com>
Date: Mon Apr 9 08:39:55 2012 +0200
Fix a crash when running with Broadway GDK backend
https://bugzilla.gnome.org/show_bug.cgi?id=673664
shell/ev-application.c | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/shell/ev-application.c b/shell/ev-application.c
index fc7a0e9..64415ce 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -651,15 +651,17 @@ ev_application_open_uri_in_window (EvApplication *application,
#ifdef GDK_WINDOWING_X11
gdk_window = gtk_widget_get_window (GTK_WIDGET (ev_window));
+ if (GDK_IS_X11_WINDOW (gdk_window)) {
+ if (timestamp <= 0)
+ timestamp = gdk_x11_get_server_time (gdk_window);
+ gdk_x11_window_set_user_time (gdk_window, timestamp);
- if (timestamp <= 0)
- timestamp = gdk_x11_get_server_time (gdk_window);
- gdk_x11_window_set_user_time (gdk_window, timestamp);
-
- gtk_window_present (GTK_WINDOW (ev_window));
-#else
- gtk_window_present_with_time (GTK_WINDOW (ev_window), timestamp);
+ gtk_window_present (GTK_WINDOW (ev_window));
+ } else
#endif /* GDK_WINDOWING_X11 */
+ {
+ gtk_window_present_with_time (GTK_WINDOW (ev_window), timestamp);
+ }
}
static void
@@ -748,15 +750,17 @@ ev_application_open_window (EvApplication *application,
#ifdef GDK_WINDOWING_X11
gdk_window = gtk_widget_get_window (GTK_WIDGET (new_window));
+ if (GDK_IS_X11_WINDOW (gdk_window)) {
+ if (timestamp <= 0)
+ timestamp = gdk_x11_get_server_time (gdk_window);
+ gdk_x11_window_set_user_time (gdk_window, timestamp);
- if (timestamp <= 0)
- timestamp = gdk_x11_get_server_time (gdk_window);
- gdk_x11_window_set_user_time (gdk_window, timestamp);
-
- gtk_window_present (GTK_WINDOW (new_window));
-#else
- gtk_window_present_with_time (GTK_WINDOW (new_window), timestamp);
+ gtk_window_present (GTK_WINDOW (new_window));
+ } else
#endif /* GDK_WINDOWING_X11 */
+ {
+ gtk_window_present_with_time (GTK_WINDOW (new_window), timestamp);
+ }
}
#ifdef ENABLE_DBUS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]