minetest/minetest — pull request #748 by kahrl (2013-06-02 15:58:51+00:00)
Title: Fix keyboard focus when closing a menu

This fixes the bug where noMenuActive() keeps returning false after
closing a menu until the mouse is moved, rendering the keyboard
unusable (the_game calls input->clear() every frame when
noMenuActive() is false).

<kahrl> my one-liner hides a deeper symptom that is caused by irrlicht
<kahrl> when the currently hovered gui element is removed from the gui
manager, the "Hovered" variable in the gui manager still points
to the element
<kahrl> and this means the element can't be deleted because the
reference count is nonzero
<kahrl> minetest currently gives keyboard focus back to the main menu in
the menu destructor, my patch makes it do that earlier