diff --git a/wl.c b/wl.c index dd57216..0cd9d26 100644 --- a/wl.c +++ b/wl.c @@ -352,10 +352,11 @@ releasegrab(void) } /* - * The context is going: give the client its keys back. The engine's - * pending text goes nowhere, because the compositor sends the text input - * its leave before it sends us the deactivate, and a commit with nothing - * focused to take it is dropped whatever serial it carries. + * The context is going: give the client its keys back and the pending + * text, as a lost focus does everywhere else. A client that only + * disabled its text input still holds the focus and takes the commit; + * when the focus itself moved, the compositor sent the text input its + * leave first and drops the commit whatever serial it carries. */ static void leave(void) @@ -365,6 +366,7 @@ leave(void) releasekeys(); if(engaged){ sendrequest(Keyrelease, 0, 0, &res); + answer(&res, ""); engaged = 0; takedraw(); }