Code

rearrange to fix the first keypress event being lost with options.savewindowgeometry...
authorbuliabyak <buliabyak@users.sourceforge.net>
Sat, 19 Jul 2008 00:20:04 +0000 (00:20 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sat, 19 Jul 2008 00:20:04 +0000 (00:20 +0000)
src/interface.cpp

index 1ad90c58c5746f1dfde172fc477b812407357fd3..dc583a645fe373e2c7fea4777b0372fdea776cc5 100644 (file)
@@ -152,6 +152,9 @@ sp_create_window(SPViewWidget *vw, gboolean editable)
 
     Gtk::Window *win = Inkscape::UI::window_new("", TRUE);
 
+    gtk_container_add(GTK_CONTAINER(win->gobj()), GTK_WIDGET(vw));
+    gtk_widget_show(GTK_WIDGET(vw));
+
     if (editable) {
                g_object_set_data(G_OBJECT(vw), "window", win);
                
@@ -166,7 +169,7 @@ sp_create_window(SPViewWidget *vw, gboolean editable)
         win->signal_delete_event().connect(sigc::mem_fun(*(SPDesktop*)vw->view, &SPDesktop::onDeleteUI));
                win->signal_window_state_event().connect(sigc::mem_fun(*desktop, &SPDesktop::onWindowStateEvent));
                win->signal_focus_in_event().connect(sigc::mem_fun(*desktop_widget, &SPDesktopWidget::onFocusInEvent));
-               
+       
         gint prefs_geometry = 
             (2==prefs_get_int_attribute("options.savewindowgeometry", "value", 0));
         if (prefs_geometry) {
@@ -214,9 +217,6 @@ sp_create_window(SPViewWidget *vw, gboolean editable)
         gtk_window_set_policy(GTK_WINDOW(win->gobj()), TRUE, TRUE, TRUE);
     }
 
-    gtk_container_add(GTK_CONTAINER(win->gobj()), GTK_WIDGET(vw));
-    gtk_widget_show(GTK_WIDGET(vw));
-
     if ( completeDropTargets == 0 || completeDropTargetsCount == 0 )
     {
         std::vector<gchar*> types;