From a72e0d8ac3128c9f04259c50147ad5a715f689ca Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 23 May 2009 21:29:52 +0000 Subject: Inkscape should not discard negative window positions. For example, a maximized window on Windows XP is at (-4,-4). When ignoring such values, windows might show up at another location when re-opening the file later on (fixes bug #168422) (bzr r7924) --- src/interface.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index 933d407a3..9901c2d69 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -182,7 +182,7 @@ sp_create_window(SPViewWidget *vw, gboolean editable) gint h = MIN(gdk_screen_height(), ph); gint x = MIN(gdk_screen_width() - MIN_ONSCREEN_DISTANCE, px); gint y = MIN(gdk_screen_height() - MIN_ONSCREEN_DISTANCE, py); - if (w>0 && h>0 && x>0 && y>0) { + if (w>0 && h>0) { x = MIN(gdk_screen_width() - w, x); y = MIN(gdk_screen_height() - h, y); } @@ -196,11 +196,9 @@ sp_create_window(SPViewWidget *vw, gboolean editable) // Empirically it seems that active_desktop==this desktop only the first time a // desktop is created. - if (x>0 && y>0) { - SPDesktop *active_desktop = SP_ACTIVE_DESKTOP; - if (active_desktop == desktop || active_desktop==NULL) { - desktop->setWindowPosition(Geom::Point(x, y)); - } + SPDesktop *active_desktop = SP_ACTIVE_DESKTOP; + if (active_desktop == desktop || active_desktop==NULL) { + desktop->setWindowPosition(Geom::Point(x, y)); } } if (maxed) { -- cgit v1.2.3