[Top][All Lists]

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

Re: make-pointer-invisible on Windows

From: martin rudalics
Subject: Re: make-pointer-invisible on Windows
Date: Wed, 24 Jun 2015 19:40:29 +0200

>> +static void
>> +w32_toggle_invisible_pointer (struct frame *f, bool invisible)
>> +{
>> +  block_input ();
>> +
>> +  if (f->pointer_invisible != invisible)
>> +    {
>> +      f->pointer_invisible = invisible;
>> +      SET_FRAME_GARBAGED (f); <<<<<<<<<<<<<<<<<<<<<<<
>> +    }
> That sounds excessive: I think it means that every self-inserting
> character will trigger thorough redisplay of the frame.

Hopefully only for the first self-inserting character typed.  After that
the f->pointer_invisible != invisible fails until the mouse is moved.

> Why do you
> need this?  Is there any problem without marking the frame garbaged?

Yes, unfortunately (this was the only time-consuming part of the patch).
If I don't mark the frame garbaged, the cursor sometimes disappears only
after typing at least two or maybe a couple of characters which is quite
distracting.  There must be some redisplay optimization which gets into
the way.

> Also, what about the equivalent of the X code that makes the pointer
> visible on focus-in events -- don't we need that on MS-Windows?

I don't know.  It's certainly not necessary on XP here.  People would
have to try though.  In general, it seems that X and Windows differ
quite substantially in their respective behaviors.  For example, on X,
when a synchronous shell operation is active, the cursor becomes visible
as soon as the mouse is moved.  On Windows, the cursor remains invisible
until the shell operation terminates and the frame gets redrawn
(obviously, the frame doesn't look very decent in that period either, so
there are worse problems).


reply via email to

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