diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-05-23 21:29:52 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-05-23 21:29:52 +0000 |
| commit | a72e0d8ac3128c9f04259c50147ad5a715f689ca (patch) | |
| tree | 616c7e88da2d34484a06d6430feaca1175ae093c /src/sp-namedview.cpp | |
| parent | Adds a Cross blotches Protrusion filter and clean Outline, Color outline and ... (diff) | |
| download | inkscape-a72e0d8ac3128c9f04259c50147ad5a715f689ca.tar.gz inkscape-a72e0d8ac3128c9f04259c50147ad5a715f689ca.zip | |
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)
Diffstat (limited to 'src/sp-namedview.cpp')
| -rw-r--r-- | src/sp-namedview.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 383f35416..c9732eece 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -435,11 +435,11 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_INKSCAPE_WINDOW_X: - nv->window_x = value ? atoi(value) : -1; // -1 means not set + nv->window_x = value ? atoi(value) : 0; object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_INKSCAPE_WINDOW_Y: - nv->window_y = value ? atoi(value) : -1; // -1 means not set + nv->window_y = value ? atoi(value) : 0; object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_INKSCAPE_SNAP_GLOBAL: @@ -750,14 +750,10 @@ void sp_namedview_window_from_document(SPDesktop *desktop) gint h = MIN(gdk_screen_height(), nv->window_height); gint x = MIN(gdk_screen_width() - MIN_ONSCREEN_DISTANCE, nv->window_x); gint y = MIN(gdk_screen_height() - MIN_ONSCREEN_DISTANCE, nv->window_y); - if (w>0 && h>0 && x>0 && y>0) { - x = MIN(gdk_screen_width() - w, x); - y = MIN(gdk_screen_height() - h, y); - } if (w>0 && h>0) { desktop->setWindowSize(w, h); - } - if (x>0 && y>0) { + x = MIN(gdk_screen_width() - w, x); + y = MIN(gdk_screen_height() - h, y); desktop->setWindowPosition(Geom::Point(x, y)); } } |
