On Sat, 2005-06-25 at 23:55 +0300, Tero Saarni wrote: > Currently grab is ended when unused key is pressed (in step 3) but the > event is discarded (keybindings.c:meta_display_process_key_event()). > Is it possible to forward it to focused window instead of discarding? >
I don't think so, at least not without finding some larger-scope changes to make of some kind. > I'm not familiar with X programming but wanted to experiment a little, > so I tried a small change below. Even though 'xev' then sees the > forwarded event (KeyPress from step 3) it still doesn't actually work > in practice. Maybe this is not the correct approach? > This won't really work; some apps ignore sent events, and you get the event out of sequence when doing this which creates race conditions. > > diff -u -r1.111 keybindings.c > --- keybindings.c 26 May 2005 19:58:17 -0000 1.111 > +++ keybindings.c 25 Jun 2005 20:23:32 -0000 > @@ -1675,6 +1675,11 @@ > "Ending grab op %d on key event sym %s\n", > display->grab_op, XKeysymToString (keysym)); > meta_display_end_grab_op (display, event->xkey.time); > + XSendEvent (display->xdisplay, > + display->focus_window->xwindow, > + False, > + 0, > + event); > } > } > > _______________________________________________ gnome-devel-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-devel-list
