Thursday, 28 June 2007

graphviz bug 1042 (right-click mouse menus not selectable) is probably 524 (numlock)

Yesterday I discovered that NumLock being on made mouse menus in graphviz tools not work.
Stupid silly thing but actually not intuitively solved.
Poking around (on nternet with google) further I think this could be a more general X programming problem.
My problem is with cygwin and solaris X clients (and cygwin X server[you know about that weird X server-client switcheroo don't you?]).

Further poking:

  Use 'xev' to trace X events
  Only difference is with NumLock on event state is 0x10 and 0x410, with off state is 0 and 0x400.

  On solaris truss dotty process (lefty) truss -u a.out and truss -u lib,libX* -t '!all'
  Interesting to note that with NumLock on then there are no events when scrolling or selecting
  mouse menu item.  So it is as if the application just has not registered for those events.
  So it is a problem at X setup/initialise time.

  checkout cvs source, update cygwin dependancies (autoconf, gd, libtool, more!),
   # augh! autoconf fails because it thinks gettext is not there :(

 download latest stable graphviz source
  ./configure; make; make install
  # That works now, hurmmm. Yikers, Okay there is windows, gtk and X gui interface.  (in  cmd/lefty/ws/)

 take a simple X  application.
 That works and isn't bothered by numlock.
 Has very different X initialisation though, leaves much more to default X stuff.
 Humm. If could find a very simple example which had the numlock bad behaviour it would make finding the
 solution easier.
 Humm :-7 push me!

Oh, By the way. For graphviz on cygwin (and a couple of other things) add this to  your  cygwin download sites (in Setup):

graphviz bug 1042 description isn't great, "right-click mouse menus not selectable" would be better.
A right click raises menu but nothing may be selected.

I saw bug 524 (old and closed) to do with num-lock.
It looks to me that 524 is duplicate of 1042.

I also of course see this bug (solaris and cygwin).
I toggled num-lock and hey presto the menus work.
This behaviour is very puzzling and most new users would not find the very simple solution!

It should not matter about numlock.

dot version 2.2 (Wed Mar 23 14:44:07 UTC 2005)
 on cygwin

dot version 1.10 (Wed Jan  5 16:56:31 GMT 2005)
 on solaris 10(sparc)
from package:
/usr/sbin/pkgchk -l -p `which dot`

both using cygwin as X server

No comments: