emacs-devel
[Top][All Lists]
Advanced

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

Re: x-autoselect-window


From: Richard Stallman
Subject: Re: x-autoselect-window
Date: Sun, 17 Feb 2002 09:49:14 -0700 (MST)

        I think that a call to Fselect_window is not enough to cause the
        relevant parts of redisplay to run, since nothing really changes
        on the screen.

I suspect that nothing calls redisplay.  It doesn't matter whether
anything has changed in the text if redisplay is not called.

This makes me worry: is Fselect_window being called from handling of
the X event, in or called from XTread_socket?  That is probably not
safe.  Calling redisplay there is certainly not safe, since redisplay
can run Lisp code.

The correct way to handle this is to generate a special input event
analogous to the switch-frame event, as a list which contains the
window.  Then that event can be bound to a command that calls
select-window.

This will also have the effect of making redisplay happen
when that command returns to the main loop.

      - I don't understand why does the test for calling Fselect_window
        insist on comparing the window, where the mouse pointer is, with
        the last window where we saw the mouse pointer.

So that jiggling the mouse will not switch windows.

      - Finally, the name x-autoselect-window seems unnecessarily
        X-specific.  Since the goal is to support this not only on X, I
        wonder whether we should have a more neutral name, like
        mouse-autoselect-window or something.

Yes, that is right.



reply via email to

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