[Sawfish] keymap resets for window / sharing input with window group

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]

Hey everyone.

I've been using sawfish for a while, and I've begun reading it's source
Playing around with it, I've been trying to write a small function to
share a window's input with the assigned window group.

My approach is:

1) write a function that sends the input (keyboard event) to the same
window group
  something like:

   (lambda (window) (synthesize-event "a" window)) 
   (nth 7 (managed-windows)))

  worked for test purposes (it sent an "a" input to the same window
  group as the 7th window managed by sawfish...)

2) write a keymap (which is the only to get all the input from a window
  right?) and bind it's keys to a function like the one above (for test
  purposes for the time being, doing the same thing: putting "a" for
  example in all the windows in the group)

3) assign the keymap to that window using the (window-put)
  function. Like this:
  (window-put (nth 7 (managed-windows)) 'keymap window-group-keymap)

I ask for your opinion/advice/suggestions with this approach...

As I'm trying this now, I have the following problem:


1) test the window's keymap is the one I assigned to it ; OK
   (= window-group-keymap (window-get (nth 7 (managed-windows)) 'keymap))  ;; 't
   ;;'window-group-keymap is the keymap I defined and assigned

2) wait a few seconds without moving from the current window
  (sawfish-mode in emacs)

3) the keymap is reseted to the original... (test in (1) returns nil )
   (= window-group-keymap (window-get (nth 7 (managed-windows)) 'keymap))  ;; ()

Is this supposed to work this way? If it is, then how I'm I suppose to
set a keymap for a specific window then?

Or if you can think of a better way to do what I'm trying to, please let
me hear about it^^.


Sawfish ML

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/