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: Sat, 11 May 2002 10:53:30 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i386-suse-linux-gnu)

   From: Richard Stallman <address@hidden>
   Date: Thu, 9 May 2002 18:29:52 -0600 (MDT)

   > That might be a bug in LessTif.  It might be correct behavior.
   > I don't know which.
   > 
   > Anyway, you can change the code to cope with it.  How about if you
   > change the code so it adds 1 when a menu item is activated and
   > substracts 1 when a menu item is deactivated?  Does it work then?

I already did this:

--- cut here ---
From:  address@hidden (Pavel Janík)
Subject: Re: C-l while in menu?
To: Richard Stallman <address@hidden>
Cc: Gerd Moellmann <address@hidden>
Cc: address@hidden
Date: Sat, 20 Apr 2002 23:06:44 +0200
User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu)

   From: Richard Stallman <address@hidden>
   Date: Sat, 20 Apr 2002 11:27:13 -0600 (MDT)

   > Can you see what is required to make this feature work with LessTif too?
   > If you can't figure out from the docs what needs doing,
   > perhaps address@hidden could give you advice.

Well, it almost works. Current CVS just process only the first key,
because popup_activated_flag is 1 only at that moment. After the first key
is processed, popup_deactivate_callback is called (many times) and that
variable is zeroed. And from now on, key in menu are no longer processed.

Good. After:

--- /home/pavel/.Emacs/Work/emacs/src/xmenu.c   Mon Jan  7 06:48:44 2002
+++ ./xmenu.c   Sat Apr 20 21:54:41 2002
@@ -1154,7 +1154,7 @@
      LWLIB_ID id;
      XtPointer client_data;
 {
-  popup_activated_flag = 1;
+  popup_activated_flag += 1;
 }
 
 /* This callback is invoked when a dialog or menu is finished being
@@ -1166,7 +1166,7 @@
      LWLIB_ID id;
      XtPointer client_data;
 {
-  popup_activated_flag = 0;
+  popup_activated_flag -= 1;
 }
 
 /* Lwlib callback called when menu items are highlighted/unhighlighted

Menu works, because popup_activated_flag is going to negative numbers very
fast... But I can no longer enter any character in the buffer, because
those keypress events are processed in menu... So I think it is not about
Lesstif knowledge, it is about how Lesstif is used in Emacs. I do not use
Lesstif so perhaps Gerd can help me. Or anyone else?
--- cut here ---

   > If they don't always balance out to zero, maybe it needs to keep track
   > of which ones have been activated and see if all of them have since
   > been deactivated.
   > 
   > If that doesn't work, then I am pretty sure it is a bug in LessTif.

I'll wait for a reply from Lesstif people.
-- 
Pavel Janík

No matter how hard you try, you can't make a baby in much less than
9 months. Trying to speed this up *might* make it slower, but it won't make
it happen any quicker.
                  -- RFC1925: The Twelve Networking Truths



reply via email to

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