From bbfd5e166a8adaf0e76919d5ee13e68db1f256c9 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Wed, 20 Feb 2019 00:40:10 +0100 Subject: Fix query for monitor dimensions The call to Gdk::Display::get_monitor_at_window() in Inkscape::UI::get_monitor_geometry_at_window() requires the underlying GdkWindow to be fully initialized. This is achieved by calling "realize()" before attempting to read that information. Previously we used to show the window first (which implies realizing it) which worked around the issue. However it required us to hide and show it once again later if we wanted to move it in order for the window manager's routines to sanitize the position to kick in. --- src/object/sp-namedview.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/object/sp-namedview.cpp') 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(); } } } -- cgit v1.2.3