]> www.fi.muni.cz Git - evince.git/commitdiff
Make sure evince starts up in the right workspace when resuming a previous
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 31 Aug 2008 15:31:16 +0000 (15:31 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 31 Aug 2008 15:31:16 +0000 (15:31 +0000)
2008-08-31  Carlos Garcia Campos  <carlosgc@gnome.org>

* 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
shell/ev-application.c

index 829f6c2930c7323cff331ba8d9b765951c751ff2..f02cc459ffc5be62989de9d1a93bcd5112cf06d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-31  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * 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  <carlosgc@gnome.org>
 
        * shell/ev-application.[ch]: (ev_application_open_window),
index 8fb487114a10fbeb621600b6bf4d63c94e16f56c..fd43c881eb65bfc984065dc3d70f253143b27270 100644 (file)
@@ -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 ();
 }
 
 /**