unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Eli Zaretskii" <eliz@is.elta.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: inactive-mode-line face?
Date: Sat, 09 Feb 2002 11:37:09 +0200	[thread overview]
Message-ID: <1659-Sat09Feb2002113708+0200-eliz@is.elta.co.il> (raw)
In-Reply-To: <5xwuxn8qiw.fsf@kfs2.cua.dk> (storm@cua.dk)

> From: storm@cua.dk (Kim F. Storm)
> Date: 09 Feb 2002 01:09:27 +0100
> 
> I just added a new mode-line-inactive face for non-selected windows.

Did it really compile without any warnings and work for you?  I find
that I need the additional changes below to make it compile and work.
(I installed these changes.)

> > Also, there could be complications with code that switches windows
> > temporarily (I'm not sure we want the active mode line to follow
> > that).
> 
> I haven't seen such problems, so don't hesitate to tell me if you find
> any!

Well, one problem is that all the windows become inactive when you are
in the minibuffer.  That is, as soon as you type "M-x" or "C-x C-f",
all the mode lines become displayed in the inactive face.  This might
be regarded as a feature, but perhaps users would like to know what
window is active even when they are typing at the minibuffer prompt.

Also, I wonder whether the default for this face should really be
different from the mode-line face.  Perhaps we want that by default
this feature is invisible; if so, the default face definitions should
just inherit from the mode-line face.

Here are the changes I installed:

Index: src/dispextern.h
===================================================================
RCS file: /cvs/emacs/src/dispextern.h,v
retrieving revision 1.124
diff -u -r1.124 dispextern.h
--- src/dispextern.h	8 Feb 2002 23:48:50 -0000	1.124
+++ src/dispextern.h	9 Feb 2002 09:09:20 -0000
@@ -927,7 +927,7 @@
    This depends on whether the window is selected or not.  */
 
 #define CURRENT_MODE_LINE_FACE_ID(W)		\
-     ((W) == selected_window			\
+     ((W) == XWINDOW (selected_window)		\
       ? MODE_LINE_FACE_ID			\
       : MODE_LINE_INACTIVE_FACE_ID)
 

Index: src/xdisp.c
===================================================================
RCS file: /cvs/emacs/src/xdisp.c,v
retrieving revision 1.724
diff -u -r1.724 xdisp.c
--- src/xdisp.c	8 Feb 2002 23:48:02 -0000	1.724
+++ src/xdisp.c	9 Feb 2002 09:15:34 -0000
@@ -13433,8 +13433,10 @@
 
   if (WINDOW_WANTS_MODELINE_P (w))
     {
+      struct window *old_w = XWINDOW (old_selected_window);
+
       /* Select mode line face based on the real selected window.  */
-      display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (old_selected_window),
+      display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (old_w),
 			 current_buffer->mode_line_format);
       ++n;
     }

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  parent reply	other threads:[~2002-02-09  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m31ygj2zmf.fsf@Janik.cz>
     [not found] ` <5xd703e406.fsf@kfs2.cua.dk>
     [not found]   ` <5137-Tue22Jan2002120220+0200-eliz@is.elta.co.il>
2002-02-09  0:09     ` inactive-mode-line face? Kim F. Storm
2002-02-09  8:32       ` Pavel Janík
2002-02-09 19:49         ` Kim F. Storm
2002-02-09  9:37       ` Eli Zaretskii [this message]
2002-02-09 20:07         ` Kim F. Storm
2002-02-09 20:39           ` Karl Eichwalder
2002-02-11  2:08         ` Richard Stallman
2002-02-11  8:29           ` Kim F. Storm
2002-02-11 15:05           ` Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1659-Sat09Feb2002113708+0200-eliz@is.elta.co.il \
    --to=eliz@is.elta.co.il \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).