Ensures keyboard notification enter events are only sent to valid keyboards. Null values could be seen when focus was changed using the mouse after unplugging a keyboard.
To test:
Use keyboard;
Open 2 views;
Focus one of them;
Unplug keyboard that was last used;
Click the other view;
Watch segfault before this change, or no segfault with it.
Thanks - seeing the change makes me feel certain there are other places where unexpected combinations of input devices aren't handled correctly, but that's a separate problem.
Ensures keyboard notification enter events are only sent to valid keyboards. Null values could be seen when focus was changed using the mouse after unplugging a keyboard.
To test: