From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: inactive-mode-line face? Date: Sat, 09 Feb 2002 11:37:09 +0200 Message-ID: <1659-Sat09Feb2002113708+0200-eliz@is.elta.co.il> References: <5xd703e406.fsf@kfs2.cua.dk> <5137-Tue22Jan2002120220+0200-eliz@is.elta.co.il> <5xwuxn8qiw.fsf@kfs2.cua.dk> Reply-To: Eli Zaretskii NNTP-Posting-Host: quimby2.netfonds.no X-Trace: quimby2.netfonds.no 1013248117 1840 195.204.10.66 (9 Feb 2002 09:48:37 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 9 Feb 2002 09:48:37 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16ZU7Y-0000TZ-00 for ; Sat, 09 Feb 2002 10:48:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16ZTyU-0001w1-00; Sat, 09 Feb 2002 04:39:14 -0500 Original-Received: from freya.inter.net.il ([192.114.186.14]) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16ZTxj-0001tk-00 for ; Sat, 09 Feb 2002 04:38:27 -0500 Original-Received: from zaretsky (diup-221-107.inter.net.il [213.8.221.107]) by freya.inter.net.il (Mirapoint) with ESMTP id BFC41982; Sat, 9 Feb 2002 11:38:16 +0200 (IST) Original-To: storm@cua.dk X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: <5xwuxn8qiw.fsf@kfs2.cua.dk> (storm@cua.dk) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:910 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:910 > 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