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.
This commit is contained in:
parent
742a3501a0
commit
d85c4d5081
2 changed files with 23 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-07-27 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* 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 <xfq.free@gmail.com>
|
||||
|
||||
* vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff.
|
||||
|
@ -15,7 +21,7 @@
|
|||
2013-07-26 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* desktop.el (desktop--select-frame):
|
||||
Try harder to reuse the initial frame.
|
||||
Try harder to reuse existing frames.
|
||||
|
||||
2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
|
|
|
@ -1311,14 +1311,22 @@ its window state. Internal use only."
|
|||
(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))
|
||||
|
|
Loading…
Add table
Reference in a new issue