From 2611a8f2b7a04116d9e50dece68115495f31a66e Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sun, 31 Aug 2008 15:31:16 +0000 Subject: [PATCH] Make sure evince starts up in the right workspace when resuming a previous 2008-08-31 Carlos Garcia Campos * shell/ev-application.c: (ev_application_open_window), (ev_application_open_uri_at_dest): Make sure evince starts up in the right workspace when resuming a previous session. svn path=/trunk/; revision=3132 --- ChangeLog | 8 ++++++++ shell/ev-application.c | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 829f6c29..f02cc459 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-31 Carlos Garcia Campos + + * shell/ev-application.c: (ev_application_open_window), + (ev_application_open_uri_at_dest): + + Make sure evince starts up in the right workspace when resuming a + previous session. + 2008-08-31 Carlos Garcia Campos * shell/ev-application.[ch]: (ev_application_open_window), diff --git a/shell/ev-application.c b/shell/ev-application.c index 8fb48711..fd43c881 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -451,7 +451,8 @@ ev_application_open_window (EvApplication *application, } ev_application_add_icon_path_for_screen (screen); - gtk_widget_show (new_window); + if (!GTK_WIDGET_REALIZED (new_window)) + gtk_widget_realize (new_window); if (timestamp <= 0) timestamp = gdk_x11_get_server_time (GTK_WIDGET (new_window)->window); @@ -609,15 +610,16 @@ ev_application_open_uri_at_dest (EvApplication *application, ev_window_open_uri (new_window, uri, dest, mode, search_string, unlink_temp_file, print_settings); - ev_document_fc_mutex_lock (); - gtk_widget_show (GTK_WIDGET (new_window)); - ev_document_fc_mutex_unlock (); + if (!GTK_WIDGET_REALIZED (GTK_WIDGET (new_window))) + gtk_widget_realize (GTK_WIDGET (new_window)); if (timestamp <= 0) timestamp = gdk_x11_get_server_time (GTK_WIDGET (new_window)->window); gdk_x11_window_set_user_time (GTK_WIDGET (new_window)->window, timestamp); - + + ev_document_fc_mutex_lock (); gtk_window_present (GTK_WINDOW (new_window)); + ev_document_fc_mutex_unlock (); } /** -- 2.43.5