From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoff Gole Newsgroups: gmane.emacs.devel Subject: xterm.c (x_clear_frame) - commented out call to XClearWindow Date: Sat, 19 Nov 2011 10:09:57 +0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1321668612 20794 80.91.229.12 (19 Nov 2011 02:10:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2011 02:10:12 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 19 03:10:09 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RRaNY-0004bL-O4 for ged-emacs-devel@m.gmane.org; Sat, 19 Nov 2011 03:10:04 +0100 Original-Received: from localhost ([::1]:34351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRaNX-0005FD-NX for ged-emacs-devel@m.gmane.org; Fri, 18 Nov 2011 21:10:03 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRaNU-0005Ex-DQ for emacs-devel@gnu.org; Fri, 18 Nov 2011 21:10:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RRaNT-0003yk-8z for emacs-devel@gnu.org; Fri, 18 Nov 2011 21:10:00 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:55565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRaNT-0003yM-3g for emacs-devel@gnu.org; Fri, 18 Nov 2011 21:09:59 -0500 Original-Received: by wwe32 with SMTP id 32so4893472wwe.30 for ; Fri, 18 Nov 2011 18:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=2CfNHLi47cswQpElB40p0bbyEGVoPN9vfhz3laznDeI=; b=iOki9acCm50KHnmF9iaJAbRelILCXgYmFIl1e6ZlmWp+099C5Ers3UvyRdMGVbwC82 10NDfYYm/mrzk3U2PTfMnxcSjcT9xsG1Jw69enfMFkCAtYJgbzpMEOm5Tp1x2BsCtUHf M2KYLzU+mJ+vhzYxJodasqnQjnNlhOlvIYIpw= Original-Received: by 10.227.209.9 with SMTP id ge9mr3657349wbb.1.1321668597707; Fri, 18 Nov 2011 18:09:57 -0800 (PST) Original-Received: by 10.180.97.135 with HTTP; Fri, 18 Nov 2011 18:09:57 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146094 Archived-At: 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.)