diff lisp/window-xemacs.el @ 2888:469ce4fa0ade

[xemacs-hg @ 2005-08-06 09:41:58 by michaels] 2005-08-06 Mike Sperber <mike@xemacs.org> * window-xemacs.el (really-set-window-configuration): Only set the frame top and left if they've changed.
author michaels
date Sat, 06 Aug 2005 09:41:59 +0000
parents 6caa3d30f19f
children b6287dbce5f0
line wrap: on
line diff
--- a/lisp/window-xemacs.el	Fri Aug 05 21:50:55 2005 +0000
+++ b/lisp/window-xemacs.el	Sat Aug 06 09:41:59 2005 +0000
@@ -291,8 +291,15 @@
 
   (frame-reduce-to-one-window frame)
   (set-window-configuration-frame-size configuration)
-  (set-frame-property frame 'left (window-configuration-frame-left configuration)) 
-  (set-frame-property frame 'top (window-configuration-frame-top configuration)) 
+
+  ; avoid setting these if they're already up-to-date
+  ; This also avoids potential inaccuracies in these settings --Mike
+  (let ((left (window-configuration-frame-left configuration))
+	(top (window-configuration-frame-top configuration)))
+    (if (not (equal left (frame-property frame 'left)))
+	(set-frame-property frame 'left left))
+    (if (not (equal top (frame-property frame 'top)))
+	(set-frame-property frame 'top top))) 
 
   ;; these may have changed because of the delete
   (let ((root-window (frame-root-window frame)))