summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aabc745)
raw | patch | inline | side by side (parent: aabc745)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sat, 23 May 2009 21:29:52 +0000 (21:29 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sat, 23 May 2009 21:29:52 +0000 (21:29 +0000) |
src/interface.cpp | patch | blob | history | |
src/sp-namedview.cpp | patch | blob | history |
diff --git a/src/interface.cpp b/src/interface.cpp
index 933d407a367db240a6510a38bd01356d83673518..9901c2d6978f6ab8ee5abe3e8e7a2de36559c9df 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
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);
}
// 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) {
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 383f35416b6bd2dff691686823d5268167ddfe2b..c9732eece6e0596a4b6460b6ae487dee0cc27d97 100644 (file)
--- 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:
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));
}
}