From e5fac5c1e24b5cf439a9e667a7c577a49dd1cff7 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sat, 19 Jul 2008 00:20:04 +0000 Subject: [PATCH] rearrange to fix the first keypress event being lost with options.savewindowgeometry == 2 --- src/interface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interface.cpp b/src/interface.cpp index 1ad90c58c..dc583a645 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -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 types; -- 2.30.2