Re: Follow up on wierd bug -- timing issue (Almost fixed)



Thanks for the suggestion  :) It almost works now. I wrote this and put
it in ~/.sawfishrc:

(defun showPyMenu ()
 (ungrab-pointer)
 (ungrab-keyboard)
 (sync-server t)
 (signal-process (string->number (read-line (open-file "~/.pymenu/.pid"
`read))) 10))

(bind-keys root-window-keymap
    "Button3-Click" `(showPyMenu))

The menu now shows -- as long as I hold the mouse button down. For some
reason as soon as I let go, sawfish makes my app think a selection event
has occurred (caused by either something in the menu being selected or a
click outside the menu). Maybe this is because sawfish is grabbing the
pointer again right away?

The sync-server call doesn't seem to be necessary for it to work either,
don't know if that's significant. I tried adding a call to
ungrab-server, that didn't help. Not sure what to try next.

Thanks for the help so far :)

P.S. Harper, sorry for you getting this twice, accidentally just sent to
you instead of the mailing list :P



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