From 042242974a1cbd778129ed03f6ad910ac3c07583 Mon Sep 17 00:00:00 2001 From: Ralf Stephan Date: Fri, 24 Feb 2006 18:06:37 +0000 Subject: make sure no negative dialog position is written into preferences, part of fix for #1290647 (bzr r178) --- src/dialogs/xml-tree.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/dialogs/xml-tree.cpp') diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index fe51f0144..60845b6bb 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -913,6 +913,9 @@ static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data) gtk_window_get_position((GtkWindow *) dlg, &x, &y); gtk_window_get_size((GtkWindow *) dlg, &w, &h); + if (x<0) x=0; + if (y<0) y=0; + prefs_set_int_attribute(prefs_path, "x", x); prefs_set_int_attribute(prefs_path, "y", y); prefs_set_int_attribute(prefs_path, "w", w); -- cgit v1.2.3