summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inkscape-window.cpp8
-rw-r--r--src/object/sp-namedview.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/inkscape-window.cpp b/src/inkscape-window.cpp
index f85d94473..bcf10cedd 100644
--- a/src/inkscape-window.cpp
+++ b/src/inkscape-window.cpp
@@ -85,11 +85,15 @@ InkscapeWindow::InkscapeWindow(SPDocument* document)
// ================ Window Options ==============
+ // Make sure the GdkWindow is fully initialized before resizing/moving
+ // (ensures the monitor it'll be shown on is known)
+ realize();
+
// Resize the window to match the document properties
sp_namedview_window_from_document(_desktop); // This should probably be a member function here.
-
+
// Must show before setting zoom and view! (crashes otherwise)
- // Should show after resizing/moving to allow window manager to correct an invalid windows size/position
+ // Showing after resizing/moving allows the window manager to correct an invalid size/position of the window
show();
sp_namedview_zoom_and_view_from_document(_desktop);
diff --git a/src/object/sp-namedview.cpp b/src/object/sp-namedview.cpp
index e4ab351d1..eafdf6dba 100644
--- a/src/object/sp-namedview.cpp
+++ b/src/object/sp-namedview.cpp
@@ -819,11 +819,7 @@ void sp_namedview_window_from_document(SPDesktop *desktop)
#endif
desktop->setWindowSize(w, h);
if (move_to_screen) {
- // Hiding window will close app if it's last window. If we really need to hide it
- // here, we need to up the reference count of the application before hiding, and lower after showing.
- // win->hide();
desktop->setWindowPosition(Geom::Point(nv->window_x, nv->window_y));
- // win->show();
}
}
}