[comp.windows.x] LeaveMouse after moving a window

rms@SUGAR-SMACKS.AI.MIT.EDU.UUCP (06/11/87)

I just made Emacs notice EnterWindow and LeaveWindow events.
When I move the Emacs window with the window manager,
if the mouse moves outside the original borders of the window, then
Emacs apparantly gets a LeaveWindow and no EnterWindow event even
though the mouse is still inside it after the window is moved.
I can see this from the way Emacs alters its display.

If I move the mouse out and in again, the EnterWindow event comes
as expected.

Xterm manages to avoid this problem, but how?

edmoy@opal.berkeley.edu (06/11/87)

In article <8706110727.AA01089@sugar-smacks.ai.mit.edu> rms@SUGAR-SMACKS.AI.MIT.EDU (Richard Stallman) writes:
>I just made Emacs notice EnterWindow and LeaveWindow events.
>When I move the Emacs window with the window manager,
>if the mouse moves outside the original borders of the window, then
>Emacs apparantly gets a LeaveWindow and no EnterWindow event even
>though the mouse is still inside it after the window is moved.
>I can see this from the way Emacs alters its display.
>
>If I move the mouse out and in again, the EnterWindow event comes
>as expected.
>
>Xterm manages to avoid this problem, but how?

When I was writing xterm to do EnterWindow and LeaveWindow events, I
had the problems with EnterWindow events and popup menus.  In this case
I always checked where the mouse really was after doing a menu thing to
see if I was or wasn't in the window.

I don't recall having problems with losing EnterWindow events during
window manager moves.  Sounds like something is eating the EnterWindow.
I'd look around for XSync() that flush the Xlib buffer, or maybe its
your window manager or X server not doing what it is supposed to.

Edward Moy
Academic Computing Services
University of California
Berkeley, CA  94720

edmoy@opal.Berkeley.EDU
ucbvax!opal!edmoy