emacsomancer / equake

A drop-down console written in Emacs Lisp, designed for eshell and terminal emulation.
GNU General Public License v3.0
2 stars 0 forks source link

`make-frame-invisible` issues #21

Open emacsomancer opened 4 years ago

emacsomancer commented 4 years ago

In GitLab by @artemyurchenko on Aug 17, 2020, 03:50

There are three lines in the code:

;; double-tap, otherwise frame lands in limbo
(make-frame-invisible current-frame)
(make-frame-invisible current-frame)                 

I wonder, if setting the force parameter of make-frame-invisible would remove the need for double invocation.

Documenting to experiment later.

emacsomancer commented 4 years ago

I pretty certain that force doesn't help (though we'd have to check different Emacs versions, I imagine): it's not an issue of the frame not becoming invisible, but an issue of the visibility property not being properly set on the first invocation. That is, the problem is that the first call of (make-frame-invisible current-frame) makes the frame invisible, but doesn't mark it as invisible: i.e. frame-visible-p still reports it as being visible. The second call of (make-frame-invisible current-frame) ends up setting the property correctly.