From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: how to find out when display property is deleted in C? Date: Tue, 13 May 2008 21:53:03 +0300 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1210704817 20318 80.91.229.12 (13 May 2008 18:53:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 May 2008 18:53:37 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 13 20:54:11 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JvzdZ-0000Qx-Oq for ged-emacs-devel@m.gmane.org; Tue, 13 May 2008 20:54:10 +0200 Original-Received: from localhost ([127.0.0.1]:37833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jvzcq-0006PH-R8 for ged-emacs-devel@m.gmane.org; Tue, 13 May 2008 14:53:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jvzcb-0006HW-8b for emacs-devel@gnu.org; Tue, 13 May 2008 14:53:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JvzcZ-0006G5-9m for emacs-devel@gnu.org; Tue, 13 May 2008 14:53:07 -0400 Original-Received: from [199.232.76.173] (port=40021 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvzcY-0006Fy-HP for emacs-devel@gnu.org; Tue, 13 May 2008 14:53:06 -0400 Original-Received: from mtaout3.012.net.il ([84.95.2.7]:10824) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JvzcY-00086Z-F0 for emacs-devel@gnu.org; Tue, 13 May 2008 14:53:06 -0400 Original-Received: from HOME-C4E4A596F7 ([83.130.255.47]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K0T00ANOMGNWBC1@i_mtaout3.012.net.il> for emacs-devel@gnu.org; Tue, 13 May 2008 22:07:36 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 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:97097 Archived-At: > From: joakim@verona.se > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > cc: emacs-devel@gnu.org > Date: Tue, 13 May 2008 08:55:48 +0200 > > > Forgive me for chiming into a discussion I wasn't following about a > > subject that I'm mostly ignorant about, but: when the display property > > goes away, Emacs triggers a redisplay the next moment it doesn't have > > anything more important to do. That redisplay should supply you with > > an event to remove the gtk widgets, no? Just plug your > > widget-removing routines into the code that runs during redisplay. > > I tried this and I'm still having difficulties. The redisplay > code optimizes drawing. It appears these optimizations make it so the > xwidget glyph draw routine isnt allways called on redisplay. Search xdisp.c for "optimiz", and you will find quite a few ways of turning off these optimizations. For example, you could set the prevent_redisplay_optimizations_p flag of the buffer, or set the value of this_line_start_pos variable non-positive. It could be that this works, but makes redisplay painfully slow, in which case less naive coding will be needed to turn off optimizations only sometimes. But at least you will know that it works; I was taught to make it right before I make it fast.