inclement / vivarium

A dynamic tiling Wayland compositor using wlroots
GNU General Public License v3.0
367 stars 13 forks source link

Ensure keyboard is not NULL before sending enter notification #129

Closed flaviozavan closed 1 year ago

flaviozavan commented 1 year ago

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:

  1. Use keyboard;
  2. Open 2 views;
  3. Focus one of them;
  4. Unplug keyboard that was last used;
  5. Click the other view;
  6. Watch segfault before this change, or no segfault with it.
inclement commented 1 year ago

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.