Avoid sending leave events to disabled widgets.

The issue was discovered by ilor in the player info dialog.
This commit is contained in:
Mark de Wever 2009-11-20 20:28:36 +00:00
parent db84892967
commit 0d72daac2e

View file

@ -235,7 +235,10 @@ void tmouse_motion::mouse_leave()
{
DBG_GUI_E << LOG_HEADER << "Firing: " << event::MOUSE_LEAVE << ".\n";
owner_.fire(event::MOUSE_LEAVE, *mouse_focus_);
tcontrol* control = dynamic_cast<tcontrol*>(mouse_focus_);
if(!control || control->get_active()) {
owner_.fire(event::MOUSE_LEAVE, *mouse_focus_);
}
mouse_focus_ = NULL;