unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* xterm.c (x_clear_frame) - commented out call to XClearWindow
@ 2011-11-19  2:09 Geoff Gole
  2011-11-21  5:15 ` Chong Yidong
  0 siblings, 1 reply; 12+ messages in thread
From: Geoff Gole @ 2011-11-19  2:09 UTC (permalink / raw)
  To: Emacs development discussions

In x_clear_frame in in xterm.c, somebody has commented out a call to
XClearWindow:

  /* The following call is commented out because it does not seem to accomplish
     anything, apart from causing flickering during window resize.  */
  /* XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); */

Unfortunately this results in a strip of pixels at the bottom of the
frame not being updated. You might be able to see it with:

  emacs -Q
  M-: (set-background-color "black")

Uncommenting the call fixes the problem, but results in the
aforementioned flicker during resize. Can we instead update only the
problematic strip:

  {
    int covered_pixels = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f));
    int leftover_pixels = FRAME_PIXEL_HEIGHT (f) - covered_pixels;

    XClearArea(FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
               0, FRAME_PIXEL_HEIGHT (f) - leftover_pixels,
               FRAME_PIXEL_WIDTH (f), leftover_pixels,
               0);
  }

Do I have this right? (I'm not familiar with either frame.c or xterm.c.)



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-11-29 18:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19  2:09 xterm.c (x_clear_frame) - commented out call to XClearWindow Geoff Gole
2011-11-21  5:15 ` Chong Yidong
2011-11-21  7:19   ` Geoff Gole
2011-11-21  8:54     ` Chong Yidong
2011-11-21 11:36       ` Geoff Gole
2011-11-21 18:02         ` Jan Djärv
2011-11-22  2:38           ` Geoff Gole
2011-11-22  5:31           ` Chong Yidong
2011-11-22  6:41             ` Jan Djärv
2011-11-22 15:37               ` Stefan Monnier
2011-11-23  6:09               ` Chong Yidong
2011-11-29 18:13                 ` Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).