emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-l while in menu?


From: Pavel Janík
Subject: Re: C-l while in menu?
Date: Wed, 08 May 2002 16:38:45 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i386-suse-linux-gnu)

   From: address@hidden (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
   > address@hidden would be interested in fixing it in Lesstif.
   > 
   > 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 = 1;
}

static void
popup_deactivate_callback (widget, id, client_data)
     Widget widget;
     LWLIB_ID id;
     XtPointer client_data;
{
  popup_activated_flag = 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?
-- 
Pavel Janík

"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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]