Wouldn't keeping the repeat active in wineserver cause unnecessary cpu usage? Should we effectively pause the repeat until we have a new focused window?
I don't think we need to worry about a couple of wake-ups for key input for the rare cases where keys are kept pressed on focus loss, but sure, that's a possible optimization.
Note that Windows applications can listen to input while in the background, and although that doesn't work very well for the moment, it's still supposedly the correct approach.
OTOH we also don't receive any input when no Wine window is focused, so we could consider that it's not worth trying to be correct here. We also currently kind of miss the ability to tell whether no Wine window is active or whether the desktop window really is: winex11 focuses the desktop window when all windows are losing focus, but the virtual desktop window can very well be focused on its own.