I'm done testing quote.scm. This completes the "Events" hierarchy.
I found a file that was missing from my taxonomy (winops.scm). I
put it in the "Window control" group.
Summary:
This file has problems. I fixed some of them, but changes need to
be done to event binding to fix the rest. There is no reliable
way to test from scheme the method used to grab an event and the
undo-passive-grab/redo-passive-grab calls only works for events
that were not specified with context 'all. The problem is these
get grabbed on the root window, but undo-passive-grab/redo-passive-grab
assume the event was grabbed on the client window. The net
result is that quoting doesn't work for events bound using the 'all
context (and has the atrocious property of installing a bogus
passive X grab). The addition of bogus passive X grabs was also
happening when quoting events that the window manager was ignoring
anyway. The basic problem is that undo-passive-grab/redo-passive-grab
do no error checking because we don't bother to store the passive
grabs we have done anywhere and they are hard to look up from the
binding list. Added BROKEN docs to these functions explaining the
situations that have problems.
Rest of the file is fine.
In process of testing this, got bitten by bug in binding.c which
prevents mouse bindings bound with 'all from ever removing the
passive X grab. The code was grabbing again instead of ungrabbing.
I fixed it in this commit.
There are problems in the binding code at the moment. The
undo-passive-grab/redo-passive-grab duo seem to be out of sync
with the way the grabs for 'all are being done. I added BROKEN
docs to them.
Changelog:
In scheme:
* quote.scm:
'quote-key-event', 'quote-mouse-event' added test to
see if we even have a passive grab on this event before ungrabbing
and regrabbing which caused it to be grabbed in the end when it
wasn't before. Added BROKEN doc about quote events which have been
grabbed via the context 'all. The problem is that the C code for
'undo-passive-grab' assumes the grab was done on the client window
but grabs for context 'all are done on the root window. This doesn't
work so well and then the 'redo-passive-grab' ends up installing a
passive grab on the client windows as well, very annoying. Not enough
info available to fix at the scheme level. Need to fix the API to the
C stuff to fix this.
A few formatting improvements.
Added docs for 'xtest-fake-modmask', 'xtest-fake-modmask-key', and
'xtest-fake-modmask-button'.
In src:
* binding.c: Added FIXMEs for bugs noticed in passing.
Doc fix for 'unbind-key'.
Added BROKEN docs for 'undo-passive-grab' and 'redo-passive-grab'.
Fixed 'ungrab_button_all_windows' so that it ungrabs the button for
the 'all context rather than regrabbing it!
Code formatting improvements.
:-(
- Scott
|