Re: Binding a function to key+mousebutton

Frank Steiner <[email protected]>
Newsgroups gmane.comp.window-managers.ctwm
Message-ID <[email protected]>
Matthew D. Fuller wrote:

> Ah!  This turns out to be the key.  It doesn't have to do with the
> key+button; it has to do with f.exec.  Bind it to just Button1, it'll
> act the same.

Ah, I see!

> It appears to be because of the XUngrabPointer() call in the f.exec
> handler (functions_misc.c:347 in head); if I take that out, I can't
> trigger it anymore.  The similar code in twm (menus.c:1987-94 in their
> head) doesn't ungrab.
> 
> That seems to have come in with ctwm 3.5, in 1997.  A look at CHANGES
> doesn't turn up any obvious suspects.  The closest may be the added
> handling of $redirect and $currentworkspace in f.exec's arg; maybe
> that uncovered some behavior that necessitated the ungrab?

Thanks for investigating! Puh, who could know that they problem they
stepped on in 1997 that made them add this ungrab call. ..

So currently it's not possible to use f.exec for any kind of mouse
button binding, right? f.exec would need to know if the ungrab is
neccessary or not but I guess it can't.

Do you have any clue why we see the ButtonRelease event only on
every second click? Does ctmw remember a button state somehow?

-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.