emacs-devel
[Top][All Lists]
Advanced

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

Re: frame-visible-p and suspend-tty


From: Chong Yidong
Subject: Re: frame-visible-p and suspend-tty
Date: Sat, 17 Jan 2009 16:40:49 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Eli Zaretskii <address@hidden> 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;
  }




reply via email to

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