Win32 flicker

300 views
Skip to first unread message

René Aguirre

unread,
Jul 24, 2010, 3:33:15 PM7/24/10
to vim...@vim.org
Hello,

Refer to the attached .diff file for a patch to an annoying issue related to un-expected flicker in the main editor window.

The reason for this is that the editor window, was not marked for clipping before the background was painted.

Just adding the proper windows style settings fixes the issue.

How to reproduce (easily):
1) Windows XP, (also in Vista, possibly on Win 7)
2) Set VIM background normal text to black
3) Set the main 3d / button face widget system color (as is used by VIM for background) to a light color, light gray or higher intensity.
4) re-start VIM
5) Open any file that allows to fill up the editor screen

Issue: During regular motion or editing, random background refresh can be noticed, on some systems this is worst (windows seems to trigger random paint request to my windows, possible due the way some services are interacting with windows explorer) and really noticeable (example with a high resolution screen).

Details on the fix: The main editor window style is changed to clip the children window from the background before erasing the background, so the text editor client area is not erased before re-painting.

IMPORTANT: I'm using the latest vim73 source from the mercurial repo in order to facilitate integration, but the issue also happens in Vim72.

Best regards

René Aguirre

bugreport.txt
win32_flicker_fix.diff

René Aguirre

unread,
Jul 27, 2010, 3:48:35 PM7/27/10
to vim...@vim.org
I think this really makes a difference for some unstable windows installs.

How can I help to make this patch to get tested (and ultimately accepted)?

Best regards

René
win32_flicker_fix.diff

Tony Mechelynck

unread,
Jul 27, 2010, 4:50:01 PM7/27/10
to vim...@googlegroups.com, René Aguirre
On 27/07/10 21:48, Ren� Aguirre wrote:
> I think this really makes a difference for some unstable windows installs.
>
> How can I help to make this patch to get tested (and ultimately accepted)?
>
> Best regards
>
> Ren�

The first step is already done: you've posted a description of the
problem, with a suggested patch, on the vim_dev group.

Now comes the harder part: Be patient. It may take hours to days for
people to notice your post, minutes to apply the patch and compile, days
to weeks to test the patched build and see if it works; and since the
problem is apparently Windows-only, it means that anyone using (as I do)
a different OS cannot test your fix.


Best regards,
Tony.
--
It is illegal for anyone to try and stop a child from playfully jumping over
puddles of water.
[real standing law in California, United States of America]

MindSpawn

unread,
Jul 23, 2011, 4:00:50 PM7/23/11
to vim...@googlegroups.com, vim...@vim.org
Hi,

Where can I get a win32 binary that includes this patch? The flicker problem is getting really annoying.

Tony Mechelynck

unread,
Jul 23, 2011, 4:46:13 PM7/23/11
to vim...@googlegroups.com, MindSpawn

Precompiled Windows distributions of Vim (with a GUI executable, a
console executable, and all runtime files) can be found at
http://sourceforge.net/projects/cream/files/Vim/ � that's what these
lists' regulars familiarly call the "Vim without Cream" distribution. It
is regularly updated, and as of this writing the latest version
(7.3.260) contains all official bugfixes published so far.

However, since I cannot find back the email to which you're replying,
and since you didn't quote any of it, I cannot be sure that this is what
you want. If it isn't, please say more clearly what you mean by "this
patch".


Best regards,
Tony.
--
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

Sumanth J.V

unread,
Jul 23, 2011, 6:57:19 PM7/23/11
to Tony Mechelynck, vim...@googlegroups.com
Hi

Sorry about that. I was referring to the following issue

http://groups.google.com/group/vim_dev/browse_thread/thread/ce70ecfd07b9821d/c5933e286590dded

Sent from my iPhone

On Jul 23, 2011, at 3:46 PM, Tony Mechelynck <antoine.m...@gmail.com> wrote:

> On 23/07/11 22:00, MindSpawn wrote:
>> Hi,
>>
>> Where can I get a win32 binary that includes this patch? The flicker
>> problem is getting really annoying.
>

> Precompiled Windows distributions of Vim (with a GUI executable, a console executable, and all runtime files) can be found at http://sourceforge.net/projects/cream/files/Vim/ — that's what these lists' regulars familiarly call the "Vim without Cream" distribution. It is regularly updated, and as of this writing the latest version (7.3.260) contains all official bugfixes published so far.

Tony Mechelynck

unread,
Jul 23, 2011, 11:45:31 PM7/23/11
to Sumanth J.V, vim...@googlegroups.com
On 24/07/11 00:57, Sumanth J.V wrote:
> Hi
>
> Sorry about that. I was referring to the following issue
>
> http://groups.google.com/group/vim_dev/browse_thread/thread/ce70ecfd07b9821d/c5933e286590dded
[...]

Ah, I see. AFAIK, that patch, which was proposed only today (or
yesterday depending on timezone) and hasn't yet been reviewed by Bram,
is not yet available other than in source form. If you want to use it,
you will have to patch the source (I recommend using Cygwin patch, which
can handle many patches on which other versions of patch for Windows
choke, e.g. because of Unix-type line endings) and then compile it yourself.

Or you may wait for an "official" bugfix, which will then soon be
included in the "Vim without Cream" executables which I mentioned earlier.

See:
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
(getting the source)

http://users.skynet.be/antoine.mechelynck/vim/compile.htm
(compiling on Windows)

http://ftp.vim.org/pub/vim/patches/7.3/README
(one-line description of every official patch for Vim 7.3)

http://sourceforge.net/projects/cream/files/Vim/
("Vim without Cream" distribution for Windows)


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
139. You down your lunch in five minutes, at your desk, so you can
spend the rest of the hour surfing the Net.

Sumanth J.V

unread,
Jul 24, 2011, 12:24:29 AM7/24/11
to Tony Mechelynck, vim...@googlegroups.com
Actually it was proposed a year ago .. Jul 24 2010 :)

Tony Mechelynck

unread,
Jul 24, 2011, 10:48:42 AM7/24/11
to Sumanth J.V, vim...@googlegroups.com
On 24/07/11 06:24, Sumanth J.V wrote:
> Actually it was proposed a year ago .. Jul 24 2010 :)
[...]

Ah, sorry, I had overlooked the year. Well, I just checked the latest
source and it doesn't include that patch. This means two things:

- The only way for you to get an executable with the patch is to compile
it yourself; see the how-to pages in my former post;
- in the year since then, the patch has suffered some bit-rot (i.e.,
other patches have been applied to the same source file, so the line
numbers have changed): the patch program will probably be able (thanks
to context lines above and below the changed lines) to find where to
apply the changes, but you should check (by viewing src/gui_w32.c after
patching and before compiling) that the result of the patching looks OK.


Best regards,
Tony.
--
When you have shot and killed a man you have in some measure
clarified your attitude toward him. You have given a definite answer
to a definite problem. For better or worse you have acted decisively.
In a way, the next move is up to him.
-- R. A. Lafferty

Reply all
Reply to author
Forward
0 new messages