[Top][All Lists]

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

Re: make-pointer-invisible on Windows

From: Eli Zaretskii
Subject: Re: make-pointer-invisible on Windows
Date: Sun, 28 Jun 2015 17:51:20 +0300

> Date: Fri, 26 Jun 2015 12:39:41 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> I understand what happens on XP: Windows sens us the WM_PAINT
> messages, which the input thread picks up and passes to the main
> thread.  But the main thread is busy-waiting inside waitpid, so it
> doesn't react to those messages until the subprocess exist.
> What I don't understand is how come the frame _is_ redrawn on Windows
> 7, and that's something I still need to look into.

No mystery here, it turns out.  On XP, we get the WM_ERASEBKGND
message when (portions of) the Emacs frame previously covered by other
windows are uncovered.  In response, we erase the rectangle specified
by the message, and we do that from the input thread, i.e. this works
even if the main thread is busy.  WM_ERASEBKGND is immediately
followed by WM_PAINT, but the latter is passed for execution by the
main thread, and that thread is busy.  This is why you wind up with an
empty rectangle.

On Windows 7, neither WM_ERASEBKGND nor WM_PAINT are sent, except when
the Emacs frame is moved or resized.  So we don't erase the rectangle,
and the text remains on screen.

> It might mean there is a way of keeping the frame display updated
> after all.

Not an easy one: we'd need to handle several expose events for
different rectangles at once.  Given that X doesn't support this, I
see no reason to invest any efforts there.

reply via email to

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