reddit / emacs

Flickers in native Windows (mingw) builds

desgreech · 2022-04-25 17:07
Does anyone experience flickers in mingw builds when scrolling or resizing the frame? I've tried looking up issues from the past and it seems that it has something to do with double-buffering, but I haven't found any solution that actually works. I have also tried snippets of the following variation: `(add-to-list 'default-frame-alist '(inhibit-double-buffering . t))` but none of them works. Are there any Windows users that have managed to find a solution for this? To be specific, I'm using Full-AOT builds from https://corwin.bru.st/emacs-28, but I've experienced the same issue with official GNU builds in the past. The same issue does not occur in WSL.
eli-zaretskii · 2022-04-26 11:50
Which command(s) cause the display to flicker, and which part(s) of the Emacs display do in fact flicker? Also, what are the dimensions of your Emacs windows and how many lines and columns you have in a typical window? (Double buffering is not supported on Windows, so it doesn't matter whether you enable or disable it.)
desgreech · 2022-04-26 16:02
> Which command(s) cause the display to flicker, and which part(s) of the Emacs display do in fact flicker? Any commands that triggers a scroll, basically. I usually use `evil-scroll-{up,down}` to navigate, but scrolling with the mouse wheel also triggers the flickering. For the part that flickers, the whole display. I have a hard time capturing it myself, but the symptoms are very similar to this guy from a different [thread](https://www.reddit.com/r/emacs/comments/aw5txy/emacs_261_strong_flickering_on_windows_10_but_not/): https://i.imgur.com/waKNMGK.gifv except that it is less severe and that the flicker does not occur during cursor navigation (or maybe at the very least, subtle enough to not capture my attention). But unlike that OP, I do not have MacType installed. > Also, what are the dimensions of your Emacs windows and how many lines and columns you have in a typical window? I usually have my frame maximized, so ~1382x754. For the lines x columns: ~100x160 if I'm not splitting them. But the flashing occurs regardless of window sizes. > Double buffering is not supported on Windows Isn't this exactly why it is flickering? Wasn't double buffering added to eliminate flickering?
eli-zaretskii · 2022-04-27 16:02
If even small windows flicker for you, and flicker all over, then I don't know why. I don't see anything close to that on my Windows system. It only flickers for me under very special circumstances which I almost never see in routine use of Emacs. Did you try reviewing the settings of your video driver? Maybe some of its features contribute to this. Double buffering is not supported on Windows because no one wrote code to implement it. If someone does, I'm sure the patches will be welcome.