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 http://www.xfree86.org/4.4.0/XtAppAddActions.3.html
 http://www.xfree86.org/current/XtAddCallback.3.html
 http://www.cs.cf.ac.uk/Dave/X_lecture/X_book_caller/ 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): http://lassauge.free.fr/cygwin



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

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

both using cygwin as X server


http://www.graphviz.org/bugs/b1042.html

http://www.graphviz.org/bugs/b524.html

http://www.google.ie/search?as_q=mouse&hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=G2&num=10&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=http%3A%2F%2Fwww.graphviz.org%2Fbugs%2F&as_rights=&safe=images

No comments: