Subject: Re: bug#18912: 24.4; mode-line corruption on graphical frames in dual-headed display

From: Eli Zaretskii <[email-masked]>
Date: Tue, 04 Nov 2014 17:56:12 +0200

> Date: Tue, 04 Nov 2014 04:05:17 -0200
> From: Bruno Félix Rezende Ribeiro <[email-masked]>
> CC: [email-masked]
> 
> Eli Zaretskii wrote:
> > Again identical.  Looks like indeed it's some problem with your
> > graphics card, because Emacs gets the same information in both cases:
> > in both cases, only 1 pixel of the last line is visible.
> > 
> > I'll try to think about additional tests, but meanwhile I suggest that
> > you try lowering the level of the acceleration of your card, and see
> > if that helps.
> 
> Totally disabling acceleration by using the driver's option "NoAccel",
> seems to fix the problem.

Good.  This seems to close the issue: the root cause is indeed some
problem with your card/driver.  It's not an Emacs bug.

> The conclusion we reach is that it's not an Emacs bug, despite the fact
> that this weirdness only manifests in Emacs.

Emacs uses standard Xlib calls to draw its windows and communicate to
X the dimensions to be used to clip partially visible lines.  Any
program that does the same will bump into the same issues.

> So we came to the point where we actually find that it's not possible to
> solve the bug, because it's beyond the realm of Emacs.

It's not possible to solve it in Emacs, but not in general.  Your card
probably has firmware, which could be updated, and a device driver,
which could be upgraded.  I'd suggest to do that, if at all possible
and practical.  Or even replace the card with another one.

> So I kindly ask you: please, provide a way to make Emacs optionally
> redraw the mode-line after any scroll operation. ;-)

I'm not yet convinced that Emacs can do _anything_ to provide a
workaround for this problem.  See my other messages as to why.