From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: [patch] cache color info for remote X sessions [Was: Emacs 21/X11 generating unbelieveable network traffic] Date: Mon, 07 Oct 2002 16:07:17 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200210072007.g97K7HG26460@rum.cs.yale.edu> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034021321 25040 127.0.0.1 (7 Oct 2002 20:08:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2002 20:08:41 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17yeBE-0006Vi-00 for ; Mon, 07 Oct 2002 22:08:40 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17yeyS-0007Qa-00 for ; Mon, 07 Oct 2002 22:59:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yeAh-0000ke-00; Mon, 07 Oct 2002 16:08:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17ye9z-0000EY-00 for emacs-devel@gnu.org; Mon, 07 Oct 2002 16:07:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17ye9v-0000C8-00 for emacs-devel@gnu.org; Mon, 07 Oct 2002 16:07:22 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ye9v-0000By-00 for emacs-devel@gnu.org; Mon, 07 Oct 2002 16:07:19 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g97K7HG26460; Mon, 7 Oct 2002 16:07:17 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: "Jan D." Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8452 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8452 > > > For AllocColor ? > > How come ? Can't Emacs dealloc the color and re-allocate it again and > > get a different result (because the color cell was allocated to some other > > color in the mean time) ? > > In principle, yes. But if Emacs runs on the default visual, it uses the > default colormap, otherwise, it creates its own. It would not be nice > by an application to change the default colormap or one created by Emacs. > > It can happen, but I consider that a bug in the application that does > such a thing. My "default" colormap has never behaved in that way. It just contains whichever colors have been requested by applications, i.e. it is changed by applications like ExMH, Netscape, Emacs, ... > > As someone whose colormap is full about 95% of the time, I can > > assure you that tose things happen ;-) > > What should happen is that when the colormap is full, a new one is > created and then the window manager switches colormap depending on > which application has the focus. I hate colormap switching. I much prefer what happens with Emacs: when XAllocColor fails, Emacs looks for the nearest color in the map and uses it. After all I generally don't care that much about the exact color. Stefan