[Top][All Lists]

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

Re: More enhancements to fringe bitmaps.

From: Kim F. Storm
Subject: Re: More enhancements to fringe bitmaps.
Date: 19 Mar 2004 15:04:24 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Marco Munari <address@hidden> writes:

> Assumption: Window managers call "window" what emacs calls "frame" and
>  emacs calls "window" the partitioned/split text area; is it allways so for
>  emacs and you?


>  moreover... Is there a difference between "selected" and "active" window?
>  (sometime i have the impression that "active window" in emacs is used for
>  "acrive frame"), if i whatch more the code i can find answare on my own,
>  but apparently you prefere the short cut.

No, active window and selected window are (or should be) the same thing.

However, there are some border cases, eg. if you are in a window, X,
and enter the minibuffer, e.g. by typing C-x C-f, the minibuffer
window is (of course) selected/active, but window X is still
considered the "selected window" in terms of
mode-line-in-non-selected-windows functionality.
Please see the doc string for that variable.

> I can add fringe_in_non_selected_windows locally (i can't do elsewhere),
> but how do you preferre to syncronize idea in the code? You know emacs
> code more than me and you have write access to cvs, not all file
> patched by me are in the best way and i know.

Just post your patches here; I can install them for you when time comes.

> Kim> A simple approach would be to use fringe-inactive unconditionally
> Kim> in non-selected windows, and the fringe face (or user defined
> Kim> face) in selected window.
> Yes, i didn't realize it is what i should do, now it's OK.
> (it is the whole cvs diff, so following patch has even previous
> fringe.c bitmaps redefinition, i will move that code later)

That's ok.  In any case, I'm not going to install anything until RMS
tells me that yours papers have arrived.

> Index: AUTHORS
> ===================================================================

Don't patch AUTHORS file.  It is machine generated.

> +(defface fringe-inactive
> +  '((((class color) (background light))
> +     :background "grey75")
> +    (((class color) (background dark))
> +     :background "grey30")
> +    (t
> +     :background "light gray"))
> +  "Basic face for the fringes of active input emacs windows."
> +  :version "21.4"
> +  :group 'frames
> +  :group 'basic-faces)

Maybe fringe-inactive should inherit from fringe face (or vice versa)?

> ===================================================================
> RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
> retrieving revision 1.169
> diff -u -r1.169 dispextern.h
> --- src/dispextern.h  14 Mar 2004 00:28:01 -0000      1.169
> +++ src/dispextern.h  19 Mar 2004 03:35:16 -0000
> @@ -1172,6 +1172,20 @@
>        ? MATRIX_HEADER_LINE_ROW (MATRIX)->height      \
>        : 0)
> +/* Return the fringe mode relative to selected/unselected window,
> +   parameters  W the window,  AFFID Active Fringe Face ID          */
> +
> +#define CURRENT_FRINGE_FACE_ID_2(W,AFFID)                    \
> +       (fringe_in_non_selected_windows                       \

Don't you mean !fringe_in_non_selected_windows here ?

> +  DEFVAR_BOOL ("fringe-in-non-selected-windows", 
> &fringe_in_non_selected_windows,
> +            doc: /* Non-nil means to use `fringe-inactive' face in 
> non-selected windows.  */);
>    mode_line_in_non_selected_windows = 1;

You mean fringe-in-non-selected-windows here.

> Kim> A more flexible approach would be for the code which does the
> Kim> actual fg/bg color selection to look at fringe-inactive face
> Kim> colors if current window is non-selected and actual face's colors
> Kim> match the fringe face colors.
> It appare you like very much fixed color customization (insted i
> prefere to think the passage from monocrome to generic color image
> (a newline-arrow bitmap for example could have 3D aspect if it's
> a color image)

My current approach is a step-wise improvement to the original
mono-crome fringe code.  Adding full image support in the fringe would
be ok, but like you I think there are more important things to work
on, so the current level of functionality is based on "need to have"
(and can be done with reasonable efforts) rather than "nice to have"
(which requires more work).

> i think there are some more interesting customization to think on...
> minibuffer positioning
>  bottom(default) and top, than absolute or relative to selected window

Feel free to work on it :-)

> notice i resize and position the bitmaps

You can do that with define-fringe-bitmap as well.  Please report
it as a bug if it doesn't work.

> Kim> > M src/xfns.c > personal preference (narrow scroll bar)
> Kim> This is supposed to be customizable via the scroll-bar-width
> Kim> frame parameter.
> i compiled with  --with-x-toolkit=yes --without-toolkit-scroll-bars
> but setting scroll-bar-width don't change the width of scroll bar
> it works after long time

How do you set the scroll-bar width?

(modify-frame-parameters nil '((scroll-bar-width . 12)))

works for me.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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