Subject: hotkeys in menus

From: [email-masked]
Date: Thu, 10 Dec 1998 02:53:46 -0600 (CST)

Full_Name: Michael Han
Version: 2.1.5
CVS_Date: 8AM GMT, 10 Dec
OS: Linux 2.0.34 + RedHat 4.1
X_Server: AcceleratedX 2.1
Submission from: (NULL) (206.86.216.254)

Hi, just did a CVS update and build. Running an Xnest on :1 and hotkeys in
menus appear to be a bit odd... I click on the root window to access my
basic menu. Then I hotkey to a submenu and attempt to hotkey an item in
the submenu. It appears that fvwm fails to update the menu context
because rather than attempting to select the appropriate item in the
submenu, it tries the hotkey in the root menu. If the hotkey does not
exist in the parent (or root? -- don't have multiple-nested menus so I
can't test the submenu of a submenu case) nothing happens. If the key
exists in the parent, it attempts to execute on the incorrectly matched
item in the parent menu. If it's an Exec-type menu item, it Exec's. But
if it's a hotkey into a different submenu, it quickly paints the submenu,
but then restores the submenu I'm currently in.

If I navigate to the submenu by the mouse and attempt to hotkey, it's the
same behavior, except that for a match on the parent submenu, it goes 
ahead and sends me to the wrong submenu.

In what I suspect is a related bug, if I navigate into a submenu, then key
left-cursor, rather than putting me back in the root menu, the menu is
unmapped. I guess PopUp menus aren't correctly becoming the context for
keyboard actions, and the context remains in the parent.

So my menu definitions are included here.
AddToMenu	"Program"		"Programs" Title
+					"&Home%mini.directory.xpm%" PipeRead \
					"FileMenu /home/mike"
+					"&Xterm%mini.xterm.xpm%" Exec xterm -geometry -0-0
+					"Go to wor&k%mini.xterm.xpm%" Popup Work
+					"G&vim%vim16x16.xpm%" Exec gvim -geometry =80x51
+					"Get UR&L%mini.netscape.xpm%" Module FormGetURL
+					"&Netscape%mini.netscape.xpm%" Exec netscape
+					"Knew&s%mini.news.xpm%" Exec knews
+					"&MH%mini.mail.xpm%" Exec exmh
+					"&Tkman%mini.book.xpm%" Exec tkman
+					"" Nop
+					"&Utilities%mini.util.xpm%" Popup Utils
+					"&Windows Apps%mini.doze.xpm%" Popup WinApps
+					"&A/V%mini.monalisa.xpm%" Popup Graphic
+					"&Games%mini.pawn.xpm%" Popup Games
+					"&Built-in Tools%mini.fvwm.xpm%" Popup Module-Popup
+					"&Customize%mini.adjust.xpm%" Popup Configure
+					"" Nop
+					"&Restart fvwm2%mini.restart.xpm%" Restart 'fvwm2'
+					"&Quit Fvwm%mini.exit.xpm%" Popup Quit-Verify

AddToMenu	"Utils"		"&Acrobat%mini.acrobat.xpm%" \
					Exec /usr/local/Acrobat3/bin/acroread
+					"&Calculator%mini.calc.xpm%" Exec xcalc
+					"&Editres%mini.gear.xpm%" Exec editres
# +					"&Top" Exec xterm -T Top -n Top -e top
+					"Xcolo&rsel%mini.rgb.xpm%" Exec xcolorsel
+					"X&fontsel%mini.font.xpm%" Exec xfontsel -noscale
+					"X&keycaps%mini.key.xpm%" Exec xkeycaps -kbd ms104
# +					"X&load" Exec xload
+					"X&man%mini.book.xpm%" Exec xman
+					"&Xmag%mini.xmag.xpm%" Exec xmag
# +					"xos&view" Exec xosview

AddToMenu	"WinApps"		"&Freecell" Exec wine32 -managed freecell
+					"&Minesweeper%winmine.xpm%" \
					Exec wine32 -managed winmine
+					"&Regedit" Exec wine32 -managed regedit
+					"&Word" \
					Exec wine16 -managed /dosstore/winword/winword.exe

AddToMenu	"Graphic"		"x&paint%mini.monalisa.xpm%" Exec xpaint
+					"pi&xmap%mini.monalisa.xpm%" Exec pixmap
+					"x&fig%mini.monalisa.xpm%" Exec xfig
+					"The &GIMP%mini.monalisa.xpm%" Exec gimp
+					"&ImageMagick%mini.monalisa.xpm%" Exec display
+					"x&v%mini.monalisa.xpm%" Exec xv
+					"x&anim%mini.movie.xpm%" FormAnimFile

AddToMenu	"Games"		"Back&gammon" Exec xgammon
+					"x&bill" Exec xbill
+					"&Chess" Exec xboard
+					"&Hextris" Exec cxhextris
+					"&Jewel" Exec xjewel
+					"&Lander" Exec xlander
+					"&Minesweeper" Exec xdemineur
+					"&Nethack" Exec /usr/games/nethack
+					"&Pacman" Exec xchomp
+					"&Tetris" Exec xtetris
+					"Trojka" Exec xtrojka

AddToMenu	"Module-Popup"	"&New Background" Exec xv -root -rmode 5 \
					-rbg black -quit -random /home/mike/images/*
+					"&Debug" Module FvwmDebug
+					"Fvwm&WinList" Module FvwmWinList
+					"&Pager" Module FvwmPager 0 0
+					"Fvwm&Buttons" Module FvwmButtons
+					"Fvwm&Talk" Module FvwmTalk
+					"&Recapture Windows" Recapture
+					"&SaveDesktop" Module FvwmSave
+					"Clean-&Up" Module FvwmClean
+					"&Identify" Module FvwmIdent

AddToMenu	"Configure"	"&Core (Globals and Functions)" Exec gvim
~~/.fvwm/main
+					"&Bindings (Mouse and Keyboard)" \
					Exec gvim ~/.fvwm/bindings
+					"&Menus" Exec gvim ~/.fvwm/menus
+					"&Decors" Exec gvim ~/.fvwm/decors
+					"&Styles" Exec gvim ~/.fvwm/styles
+					"Mod&ules" Exec gvim ~/.fvwm/modules
+					"" Nop
+					"&Resources" Exec gvim ~/.Xdefaults
+					"Re&apply resources" Exec xrdb -merge ~/.Xdefaults

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 10 Dec 1998 16:48:20 +0100

> keyboard actions, and the context remains in the parent.

That awfully sounds as if you were using old code. Are you absolutely sure
the compile didn't go wrong? I've fixed the second once, but never saw the
first one. I need all commands related to menus (i.e. at the very least I
need you MenuStyle command line).

Bye

Dominik
-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]