From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pavel@Janik.cz (Pavel =?iso-8859-2?q?Jan=EDk?=) Newsgroups: gmane.emacs.devel Subject: Re: C-l while in menu? Date: Wed, 08 May 2002 16:38:45 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200204072343.g37NhIC20114@aztec.santafe.edu> <200204201727.g3KHRD401381@aztec.santafe.edu> <86sn5pe1xs.fsf@gerd.dnsq.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1020869471 23560 127.0.0.1 (8 May 2002 14:51:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 May 2002 14:51:11 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 175Smd-00067t-00 for ; Wed, 08 May 2002 16:51:11 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 175Sun-0006Zz-00 for ; Wed, 08 May 2002 16:59:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 175Sma-0006bZ-00; Wed, 08 May 2002 10:51:08 -0400 Original-Received: from p0077.as-l043.contactel.cz ([194.108.242.77] helo=SnowWhite.SuSE.cz) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 175SkA-0006Lq-00; Wed, 08 May 2002 10:48:39 -0400 Original-Received: by SnowWhite.SuSE.cz (PJ, from userid 500) id 0815918496; Wed, 8 May 2002 16:51:07 +0200 (CEST) Original-To: gerd@gnu.org X-Face: $"d&^B_IKlTHX!y2d,3;grhwjOBqOli]LV`6d]58%5'x/kBd7.MO&n3bJ@Zkf&RfBu|^qL+ ?/Re{MpTqanXS2'~Qp'J2p^M7uM:zp[1Xq#{|C!*'&NvCC[9!|=>#qHqIhroq_S"MH8nSH+d^9*BF: iHiAs(t(~b#1.{w.d[=Z In-Reply-To: <86sn5pe1xs.fsf@gerd.dnsq.org> (gerd.moellmann@t-online.de's message of "21 Apr 2002 13:17:03 +0200") User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i386-suse-linux-gnu) Original-Lines: 57 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3735 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3735 From: gerd.moellmann@t-online.de (Gerd Moellmann) Date: 21 Apr 2002 13:17:03 +0200 > I'd check the behavior with OpenMotif and with the newest Lesstif from > CVS. If it works in OpenMotif and doesn't work in Lesstif, I think > lesstif@hungry.com would be interested in fixing it in Lesstif. >=20 > Otherwise, I'm pretty sure someone will be willing to help out. They > were very cooperative last time I tried. The problem still remains. I still think it is not problem in lesstif or openmotif. I'll try to describe the problem again with more details: I use popup_activated_flag to dispatch KeyPress events. Its value is changed with these two functions from xmenu.c: static void popup_activate_callback (widget, id, client_data) Widget widget; LWLIB_ID id; XtPointer client_data; { popup_activated_flag =3D 1; } static void popup_deactivate_callback (widget, id, client_data) Widget widget; LWLIB_ID id; XtPointer client_data; { popup_activated_flag =3D 0; } The problem is, that the current code (in lwlib-Xm.c) doesn't work as expected. When you activate menu File, you can control the menu via keyboard (Up, Down). This works, but just after highlighting the next top-level item in the menu-bar (ie. Edit), our variable popup_activated_flag got zeroed. What is the reason? It is simple. First, popup_activate_callback of the new menu is called and thus popup_activated_flag is set to 1, but after a moment, popup_deactivate_callback is called many times because it is called for all menu-items in the previous (File) menu. I do not personally use Motif code, but I think that the false value of popup_activated_flag (it can very easy be 1 even when the popup is not activated) is dangerous and could be the source of potential problems (I saw that it is used to temporary disable redisplay etc). What is the right approach to this problem? --=20 Pavel Jan=EDk "when" is not a word I find useful about most bios bugs. Try "if" or "less likely that being hit on the head by an asteroid" -- Alan Cox in LKML about possibility of fixing BIOS bugs