From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: removing flickering in emacs Date: Mon, 12 Dec 2005 11:39:30 +0100 Message-ID: <439D5362.3050303@swipnet.se> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1134401169 5734 80.91.229.2 (12 Dec 2005 15:26:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2005 15:26:09 +0000 (UTC) Cc: Gerd Moellmann , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 16:26:06 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ElpYi-0002dp-PN for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2005 16:25:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElpAl-0000bt-So for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2005 10:01:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EllJ8-0006bo-Nd for emacs-devel@gnu.org; Mon, 12 Dec 2005 05:53:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EllBk-0004ex-CG for emacs-devel@gnu.org; Mon, 12 Dec 2005 05:45:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ell6q-0003zM-UE for emacs-devel@gnu.org; Mon, 12 Dec 2005 05:40:45 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ell8S-0003IO-Oy; Mon, 12 Dec 2005 05:42:25 -0500 Original-Received: from coolsville.localdomain ([83.226.180.193] [83.226.180.193]) by mxfep02.bredband.com with ESMTP id <20051212104006.PIMM17186.mxfep02.bredband.com@coolsville.localdomain>; Mon, 12 Dec 2005 11:40:06 +0100 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: =?windows-1252?Q?Michal_Maru=B9ka?= In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47541 Archived-At: Michal Maruška wrote: >Hello, >I have written a patch for CVS emacs as a proof-of-concept for my method of >removing flickering caused by using background (pixel or pixmap) of windows in >X11, flickering which happens on Exposure, and on resizing. > >The method is described at > > http://maruska.dyndns.org/wiki/anti-flicker-method > >I don't know Xt, so I limit myself to xlib, and I tested the patch with >./configure --with-x-toolkit=no --without-gtk (--with-png --with-jpeg --without-xim) > > >I would appreciate comments from people who know the display code. > > >The patch itself is: >http://maruska.dyndns.org/comp/packages/cvs-emacs-flicker-free.patch > I find the patch hard to follow, there are too much #if 0 and code that is commented out. But reading your anti-flicker-method page it seem that the theory is to use window background None and explicitly write the background yourself. I can not see how that would improve things, instead of having the X server clear the background itself, you are doing it from the client. This introduces more client to server calls and no visible advantage. You wonder about Gtk+ on you page. IMHO they have taken the proper approach to flikering by using double buffering everywhere. Unfortunately Emacs compiled for GTK can not use this feature, except for menus, scrollbars and toolbars. But as a principle, double buffering is easier to implement (no need to keep track of intersecting areas) and is sure to remove flicker. As a side not, I haven't seen much flicker in Emacs, and the time that there where some, those places where bugs that has been fixed. Can you supply a test case where flickering in Emacs can be clearly seen? Jan D.