* frame-visible-p and suspend-tty
@ 2009-01-17 17:46 Eli Zaretskii
2009-01-17 19:28 ` Chong Yidong
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2009-01-17 17:46 UTC (permalink / raw)
To: emacs-devel
The documentation of frame-visible-p says:
On a text-only terminal, all frames are considered visible, whether
they are currently being displayed or not, and this function returns
@code{t} for all frames.
What about a text-only terminal that has been suspended? The frames
on such a terminal are neither visible nor being updated, and yet this
function seems to still return t for them (unless my testing was
faulty). That doesn't sound right.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: frame-visible-p and suspend-tty
2009-01-17 17:46 frame-visible-p and suspend-tty Eli Zaretskii
@ 2009-01-17 19:28 ` Chong Yidong
2009-01-17 21:34 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2009-01-17 19:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> The documentation of frame-visible-p says:
>
> On a text-only terminal, all frames are considered visible, whether
> they are currently being displayed or not, and this function returns
> @code{t} for all frames.
>
> What about a text-only terminal that has been suspended? The frames
> on such a terminal are neither visible nor being updated, and yet this
> function seems to still return t for them (unless my testing was
> faulty). That doesn't sound right.
IIUC, a text terminal cannot be suspended unless it is the only existing
terminal. In that case, how would this function run?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: frame-visible-p and suspend-tty
2009-01-17 19:28 ` Chong Yidong
@ 2009-01-17 21:34 ` Eli Zaretskii
2009-01-17 21:40 ` Chong Yidong
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2009-01-17 21:34 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-devel
> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 17 Jan 2009 14:28:41 -0500
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > The documentation of frame-visible-p says:
> >
> > On a text-only terminal, all frames are considered visible, whether
> > they are currently being displayed or not, and this function returns
> > @code{t} for all frames.
> >
> > What about a text-only terminal that has been suspended? The frames
> > on such a terminal are neither visible nor being updated, and yet this
> > function seems to still return t for them (unless my testing was
> > faulty). That doesn't sound right.
>
> IIUC, a text terminal cannot be suspended unless it is the only existing
> terminal.
??? suspend-tty works _only_ if at least one more terminal exists, see
its docs.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: frame-visible-p and suspend-tty
2009-01-17 21:34 ` Eli Zaretskii
@ 2009-01-17 21:40 ` Chong Yidong
0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2009-01-17 21:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> IIUC, a text terminal cannot be suspended unless it is the only
>> existing terminal.
>
> ??? suspend-tty works _only_ if at least one more terminal exists, see
> its docs.
OK---I got confused. Could you test whether this patch DTRT?
*** trunk/src/frame.c.~1.410.~ 2009-01-14 08:29:56.000000000 -0500
--- trunk/src/frame.c 2009-01-17 14:23:45.000000000 -0500
***************
*** 1957,1975 ****
a window system, it may not show at all.
Return the symbol `icon' if frame is visible only as an icon.
! On a text-only terminal, all frames are considered visible, whether
! they are currently being displayed or not, and this function returns t
! for all frames. */)
(frame)
Lisp_Object frame;
{
CHECK_LIVE_FRAME (frame);
! FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
! if (FRAME_VISIBLE_P (XFRAME (frame)))
return Qt;
! if (FRAME_ICONIFIED_P (XFRAME (frame)))
return Qicon;
return Qnil;
}
--- 1957,1979 ----
a window system, it may not show at all.
Return the symbol `icon' if frame is visible only as an icon.
! On a text-only terminal, a frame is considered visible if and only if
! its terminal is active (i.e., not suspended), regardless of whether it
! is currently being displayed. */)
(frame)
Lisp_Object frame;
{
+ struct frame *f;
CHECK_LIVE_FRAME (frame);
+ f = XFRAME (frame);
! FRAME_SAMPLE_VISIBILITY (f);
! if (FRAME_TERMCAP_P (f))
! return (f->terminal->display_info.tty->output ? Qt : Qnil);
! if (FRAME_VISIBLE_P (f))
return Qt;
! if (FRAME_ICONIFIED_P (f))
return Qicon;
return Qnil;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-17 21:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17 17:46 frame-visible-p and suspend-tty Eli Zaretskii
2009-01-17 19:28 ` Chong Yidong
2009-01-17 21:34 ` Eli Zaretskii
2009-01-17 21:40 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.