emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113565: lisp/desktop.el: Restore frames at their po


From: Juanma Barranquero
Subject: [Emacs-diffs] trunk r113565: lisp/desktop.el: Restore frames at their positions, even if offscreen.
Date: Sat, 27 Jul 2013 01:02:18 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113565
revision-id: address@hidden
parent: address@hidden
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sat 2013-07-27 03:02:00 +0200
message:
  lisp/desktop.el: Restore frames at their positions, even if offscreen.
  (desktop--make-frame): Apply most frame parameters after creating the frame
  to force (partially or totally) offscreen frames to be restored as such.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/desktop.el                desktop.el-20091113204419-o5vbwnq5f7feedwu-591
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-27 00:23:21 +0000
+++ b/lisp/ChangeLog    2013-07-27 01:02:00 +0000
@@ -1,3 +1,9 @@
+2013-07-27  Juanma Barranquero  <address@hidden>
+
+       * desktop.el (desktop--make-frame): Apply most frame parameters after
+       creating the frame to force (partially or totally) offscreen frames to
+       be restored as such.
+
 2013-07-26  Xue Fuqiao  <address@hidden>
 
        * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff.
@@ -15,7 +21,7 @@
 2013-07-26  Juanma Barranquero  <address@hidden>
 
        * desktop.el (desktop--select-frame):
-       Try harder to reuse the initial frame.
+       Try harder to reuse existing frames.
 
 2013-07-26  Stefan Monnier  <address@hidden>
 

=== modified file 'lisp/desktop.el'
--- a/lisp/desktop.el   2013-07-26 17:49:52 +0000
+++ b/lisp/desktop.el   2013-07-27 01:02:00 +0000
@@ -1311,14 +1311,22 @@
        (push visible alt-cfg)
        (push (cons 'fullscreen fullscreen) alt-cfg)))
 
-    ;; Time to select or create a frame an apply the big bunch of parameters
-    (if (setq frame (desktop--select-frame display filtered-cfg))
-       (modify-frame-parameters frame
-                                (if (eq (frame-parameter frame 'fullscreen) 
fullscreen)
-                                    ;; Workaround for bug#14949
-                                    (assq-delete-all 'fullscreen filtered-cfg)
-                                  filtered-cfg))
-      (setq frame (make-frame-on-display display filtered-cfg)))
+    ;; Time to find or create a frame an apply the big bunch of parameters.
+    ;; If a frame needs to be created and it falls partially or wholly 
offscreen,
+    ;; sometimes it gets "pushed back" onscreen; however, moving it afterwards 
is
+    ;; allowed.  So we create the frame as invisible and then reapply the full
+    ;; parameter list (including position and size parameters).
+    (setq frame (or (desktop--select-frame display filtered-cfg)
+                   (make-frame-on-display display
+                                          (cons '(visibility)
+                                                (cl-loop
+                                                 for param in '(left top width 
height)
+                                                 collect (assq param 
filtered-cfg))))))
+    (modify-frame-parameters frame
+                            (if (eq (frame-parameter frame 'fullscreen) 
fullscreen)
+                                ;; Workaround for bug#14949
+                                (assq-delete-all 'fullscreen filtered-cfg)
+                              filtered-cfg))
 
     ;; Let's give the finishing touches (visibility, tool-bar, maximization).
     (when lines (push lines alt-cfg))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]