emacs-devel
[Top][All Lists]
Advanced

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

Re: x_autoselect_window_p


From: Gerd Moellmann
Subject: Re: x_autoselect_window_p
Date: 01 Apr 2002 16:55:54 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

address@hidden (Pavel Janík) writes:

>    > > +                    /* Window will be selected only when it is not 
> selected now and
>    > > +                       last mouse movement event was not in it.  
> Minibuffer window
>    > > +                       will be selected iff it is active.  */
>    > > +                    if (!EQ (window, last_window)
>    > > +                        && !EQ (window, selected_window)
>    > > +                        && (!MINI_WINDOW_P (XWINDOW (window))
>    > > +                            || (EQ (window, minibuf_window) && 
> minibuf_level > 0)))
>    > 
>    > Maybe it's better to leave this condition testing to the Lisp function
>    > that is called at the end for handling the event?  It would have the
>    > advantage of being more flexible.
> 
> Well, we can split this. I do not want to generate an event for every
> mouse move, so I think it is OK to have
> 
>    +                if (!EQ (window, last_window)
>    +                    && !EQ (window, selected_window)
> 
> here, but the rest can in fact be moved to Elisp.

Yes, probably.

>    > 
>    > > +                      {
>    > > +                        fprintf(stderr, "WINDOW_IN_EVENT 
> generated!\n");
>    > > +
>    > > +                        bufp->kind = WINDOW_IN_EVENT;
>    > > +                        XSETFRAME (bufp->frame_or_window, window);
>    > > +                        bufp->arg = Qnil;
>    > 
>    > Strictly speaking, it might be a good idea to check for numchars > 0
>    > before filling in the event.
> 
> Like this?

Yup.

I guess that's all, then.  Except maybe that I forgot to warn that I
didn't see the case handled where the mouse is moved to something
that's not selectable.



reply via email to

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